What I basically want to achieve is to type in a custom command in the terminal and a specific shell script should run each time.
I could achieve the above requirement with folders,by modifying the bashrc file like below
alias myScripts="cd /home/arun/Desktop/scripts"
Now when I try to do the same with a bash script by modiying the bashrc file as given below,
alias masterScript="bash /home/arun/Desktop/scripts/myMasterScript.sh"
now when I type masterScript im getting the following error:
"bash : No such file or directory" error
How can I correct this?
Best Answer
Just create a function:
And make sure your script is executable: