The alias command makes it possible to launch any command or group of commands,It allows a user to create simple names or abbreviations (even consisting of just a single character) for commands regardless of how complex the original commands are and then use them in the same way that ordinary commands are used.
Synax :
In order to assign a lengthy command to a single character ,type
example:
If you want make a alias for a script , type
Now you can run the "Script/command" by typing the alias of it.
That's it. :-)
Synax :
$ alias [-p] [name="value"]
In order to assign a lengthy command to a single character ,type
# alias <your_desired_string>="<command>"
example:
# alias a="ls -l"
If you want make a alias for a script , type
$ alias <character>="sh <script_name>"Example:
$ alias 1="sh exim.sh"Multiple commands can be included in the same alias by inserting them within the same pair of quotation marks and separating them with semicolons(;). For example, the alias sp could be created to first launch hostname and then immediately launch hostname -i :
$ alias sp='hostname;hostname -i'
Now you can run the "Script/command" by typing the alias of it.
That's it. :-)
No comments:
Post a Comment