1. jsr was possibly set to some special value for debugging the script? Who knows...
2. There are three types of quotes used in that script fragment. The normal double quote ("), single quote(') and back ticks (`). There are subtle differences between the way the shell handles things with the first two types, but mostly they can be used interchangeably. The backticks have a very special meaning, although in Bash I prefer to use the $() construct which is easier to read, can be nested and doesn't get confused by quotes so often.
3. Putting curly braces around a variable name is a way of delimiting the name. What would have happened if you left them out?
Code: Select all
if $jsr CheckCDROM $cdPathDir; then
$jsr EchoN "$NLLocated CDROM at $cdPathDir $NL"
else
The shell will now try to echo the contents of a variable called NLLocated, instead of one called NL followed by the word "Located".