A Unix script is a program which is written in a programming language built into one of the Unix shells. Unix Scripts are basically used as a domain-specific language. They are developed for smaller and specific purpose like file manipulation, printing, backup, scheduling jobs, and so on.
Unix scripts are generally executed on command line. 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. There are tools available in the market which allows you to run Unix scripts via a graphical interface.
In most cases, people use Unix scripts to execute a bunch of Unix commands as a single set or group.
Example: 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 every time you connected.
Your simple Unix script could contain just this one line:
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”.