Case Study 5
Case Study 5
Solution to Invoke a shell script from a single word
lets say we have a shell script to start services.
ex: /tmp/startservice.sh
Goto your home directory
cd ~
Open the shell in vi editor (ex for bash)
# ls -lrtha
# vi .bashrc
Add an Alias to your script
#vi .bashrc
alias startservice='/tmp/startservice.sh'
Restart your shell or reload the configuration file
#source .bashrc
Execute the script by typing singleword
#startservice