Thursday, 13 December, 2007

Shell Scripting

I found quotes are little bit tricky and confusing in Shell Script. Below is about them got from
"Double Quotes" - Anything enclose in double quotes removed meaning of that characters (except \ and $).
'Single quotes' - Enclosed in single quotes remains unchanged.
`Back quote` - To execute command.
Also, it looks like interpreter converts all the "Double Quotes" into 'single quotes' and again executes this resulted one with single quotes. You can get this from the output if you have "#!/bin/sh -vx" as first line in your script.

1 comment:

Puthali said...

da last bit was an interesting trivia...