Basic Unix shell script

The program must start with the following line (it must be the first line in the file):

#!/bin/sh

The #! characters tell the system that the first argument that follows on the line is the program to be used to execute this file.
In this case /bin/sh is shell we use.

When you have written your script and saved it you have to make it executable to be able to use it.
To make a script executable typechmod +x filename
Then you can start your script by typing: ./filename

Post a Comment

Previous Post Next Post

Contact Form