tecumsehjoe
asked on
create script
i want to create a script that will aid in automating bash commands, such as making directories, changing permissions, moving files, etc...
How do I do this? I am under the impression I need to make an executable file that contains these commands, but what else needs to be done? Is there some special syntax in the file or something else? Any links, refrences, hints?
How do I do this? I am under the impression I need to make an executable file that contains these commands, but what else needs to be done? Is there some special syntax in the file or something else? Any links, refrences, hints?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
alias xe="chmod +x"
alias log="cd /var/log"
alias mes="less /var/log/messages"
alias erc ="vi ~/.bashrc;source ~/.bashrc"
xe myfile will make myfile executable. log will change to the /var/log directory etc. You can alias several comands by putting a ; between them. I would only use scripts for more complex tasks.