What is a Unix script?
A Unix script is a program which is written in a programming language built into one of the Unix shells.
If you can type commands into the Unix shell, you can write a shell script. A shell script can be as simple as a text file containing a list of commands.
Let's say that you frequently FTP to the server ftp.ox.ac.uk. You could create a Unix script called "ox" to FTP to that server automatically. This would save you typing everytime you connected.
Your simple Unix script could contain just this one line:
ftp ftp.ox.ac.uk
You could then execute your script by using the command "sh ox", or you could set the file permissions of the script to allow it to be executed by typing just "ox".
![]() Mastering Unix Shell Scripting |
Covering all flavors of Unix with an emphasis on AIX, Linux, HP-UX, and Solaris operating systems, Michael writes for anyone who works with Unix on a daily basis from the command line: programmers, programmer-analysts, system operators, systems administrators, and anyone who wants to get ahead in support. His guide to shell scripting assumes a basic working knowledge of common Unix commands.
|
|
Bookmark What is a Unix script?


