Alvin wrote:
> I've always thought that single quotes turned off expansion. Well, I've
> learned something today!
Right, normally they do, but when singles are inside doubles,
their meaning is turned off by the double quotes, so that they're
treated as just normal characters.
For instance:
echo "'"
..is one way to echo a single quote.
If the single quote's normal operation were not disabled by the double
quotes, then that command would failing because there's no closing
single quote.
> [EMAIL PROTECTED]:~> compile="my source.cxx"
> [EMAIL PROTECTED]:~> prog="`basename \"$compile\" .cxx`"
> [EMAIL PROTECTED]:~> echo $prog
Yes, that's basically your V2 patch which seems to work.
> Who would have thunk it that quotes could be so much fun!!
It certainly was a common thread on comp.unix.shells, or whatever
the heck that usenet group for the shells was in the 90's.
Bourne quoting is certainly better thought out than csh's.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev