Example of using a shell script

To make a file containing a shell script executable and then run the script:

   display
   display: execute permission denied
   chmod u+x display
   display
   Date and time is:
   Mon Mar  8 10:51:17 GMT 1993
   Your username is: erpl08
   Your current directory is: /home/erpl08/scripts

The command display does not run the script as the user does not have execute permission for the file. They give themselves execute permission and then re-enter the command to run the script.


[Home] [Search] [Index] This site maintained by guichard@whitman.edu