Invoking The Shell The shell is a command and can be invoked just like a command (Don’t type the following command, it's only an example!).
sh proc [arg . . .] a shell is created to process proc
sh -v proc [arg . . .] same as previous but input lines are printed
proc [arg . . .] if proc is an executable script file, it is the same as typing sh proc [arg . . .]
Shell Script Files
Shell Script Files
These are text files that contain shell commands. The file must be flagged as executable using the chmod utility.
Type the following command
$ cat - > script
Enter the following lines as they appear below, finishing with the ctrl-d (that is the control key and the d key pressed at the same time) which will bring the shell prompt back.
echo The date is
echo The date is
date
ctrl-d
$
Flag the file as executable.
$ chmod +x script
Execute the file by typing
$ sh script
Introduction to Shell Scripting - Part 2 By Ben Okopnik
Read more
$ chmod +x script
Execute the file by typing
$ sh script
Introduction to Shell Scripting - Part 2 By Ben Okopnik