I don’t use shell scripts too often and had a brain dead moment on how to execute a shell script.
So, for the dummies
, here’s a summary so next time I forget I can quickly look at my posts:
For Creating Shell programs
# vi filename.sh (vi is one of many text editors for linux systems)
For Running Shell Programs
# sh filename.sh
or
# chmod 744 filename.sh (you need to change the permission so you, the owner, can execute the script)
#./filename.sh
The most common editor used in UNIX/Linix type operating systems is without a doubt VI. But it can be a pain to remember all the commands used to edit text files/configs and the like.
Here is a quick reference for more than enough commands to keep you busy.
My favourite ‘get out of trouble’ command is the ESC :wq! sequence which will quit without saving the changes I have made
Continue Reading »
UNIX/Linux VI made easy with this reference





