Linux定义Custom Shell Command? [英] Linux to define Custom Shell Command?

查看:41
本文介绍了Linux定义Custom Shell Command?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想简单地定义一个自定义的shell命令,例如:
我输入 abc ,它将输出一些文本.

I want to simply define a custom shell command, for example:
I type abc and it will output some text.

赞:

$ abc
The quick brown fox jumps over the lazy dog.

  • 如何在Linux中简单地制作它?
  • 推荐答案

    尝试别名

    alias abc="echo The quick brown fox jumps over the lazy dog."
    

    您可以将其添加到〜/.bash_profile中,以使其对所有会话均有效.

    you can add it into your ~/.bash_profile to make it valid for all sessions.

    这篇关于Linux定义Custom Shell Command?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆