#!/bin/ksh Explained
As discussed previously, a shell script is nothing more than a set of commands saved in a file. When the script is executed, the set of commands in the file are passed to an interpreter for processing. Several shells are available that a script writer can choose. How do you indicate that your script is a Korn Shell script, and is to be interpreted by ksh (and not csh, sh, bash, tcsh, or any other shell program)?
In shell scripting, the way to do this is to make the first line of the script file contain special characters that will precede a file specification locating the program responsible for interpreting the remaining lines in the file.
Normally a pound sign (#) begins a comment. Comments are lines in the script file ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access