This shell script and shell programming site aims to provide book reviews and free ebook on bash shell, korn shell, shell commands, linux shell, awk shell, unix commands, ftp shell and all other shells.

Shell Programming Part 2

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
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
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

Followers