Originally Posted by Madison00
I am learning ksh shell and have question, below is the command and I am not clear exactly it mean:
1. does it mean they want to set ScriptDir variable to dirname?
dirname $0 is between backticks, which means that it (dirname $0) is executed and the content is put into the SCriptDir variable.
2. $0: is it standard input?
$0 holds the name of the script itself. $1, $2, $N are the "input" you give when starting a script.
I.e: myscript.ksh foo bar
-> $0 will be myscript.ksh, $1 would be foo and $2 bar.
3. I have been reading a lot of book and able to understand each seperate command, my problem is I have a hard time to put all of the command together. any recommendations?
KSH has some dialects and it depends a bit on which you use. I like Learning the Korn Shell
by O'Reilly (ISBN 1-56592-054-6) it focusses on ksh88.
Hope this helps.