Shell scripts are command lines that
the shell executes in a group. The files .profile
and .kshrc are
examples of shell scripts.
To create a script, edit a file using an editor such as vi.
If you don't know how to create a file using an editor, see The
Ultimate Guide to the vi and ex Text Editors, or Using
HP-UX. After you create the script, the file containing
your command lines, you are ready to execute it.
First, make sure the file (script) is executable; type:
This command changes file permissions on the new file so that
it is executable. If you want more details on file permissions,
see Using HP-UX. Then type the script_name
(that is, the script filename):
and the script executes and prints out any output you specified.