View Single Post
Old 7th June 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

The shells way of handling quoting can be a bit irksome at first but eventually you will love it (or curse it).

This awk tutorial gives a good overview of it when it talks about embedding awk programs within shell script.


Or for the programmer summery...

'' -- no interpolation
"" -- variable interpolation
`` -- execute shell commands and return output (as a scalar value I believe)

group of words within qoutes -- string
strings separated by white spaces are automatically concatenated (e.g. 'foo'$var'bar' is the same as foo${var}bar)
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote