The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




Thread: Using a script?
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 10-03-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
A script is simply a list of instructions that you may type at the keyboard, but put in a file with a very simple header ( "#!/bin/sh" ). They are then made executable using "chmod +x script-name".

These are normally stored in a well choosen directory and are run by type their pathname at the shell prompt. They can also be executed by other agents such as cron, or at startup/shutdown.

A commonly used naming convention is they have the shell type as an extension, eg *.sh, *.ksh, *.csh etc.