So far, you’ve learned how to start writing a Korn shell script by writing a basic script header and defining some variables. Now it's time to start writing some Korn shell code.
Since shells may differ in syntax, a script executed successfully using one shell may fail when a different shell is used to run it. For example, a Korn Shell script (ksh) may not execute correctly if it's executed with the Bourne Shell (sh) because the latter does not understand all of the syntax used by the former.
This is my first video. The audio and presentation are a little rough. However, the videos get better.
This video goes over:
what exactly is korn shell, how to use a print statement in a korn shell script, and how to add a comment.
To begin writing your first Korn shell script, you need to open the vi editor and add the shell name as the first line. After that, you need to build some type of script header telling users who wrote the script, what the script does, and when it was written. You can name your script anything you want, but you usually use the extension .ksh to refer to a Korn shell script. You do not have to do this, but it's good practice. The pound symbol (#) is used to comment with scripts, as shown in .