On Sun, 03 May 2009 12:01:14 -0700, Randall R Schulz wrote:
On Sunday May 3 2009, Jim Henderson wrote:
...
Bash *should* have induced that the "!" was in a quoted line and shouldn't have expanded it. It did for some reason - maybe because Duaine put two single quotes instead of a double quote at the start of the string. I don't know why and I don't particularly care.
No. The grammar of BASH includes history expansion in double-quoted strings. Only single-quoted strings protect against history expansion.
If by "should" you mean to express a disagreement with the authors of BASH on when history expansion should be active, well, that's your prerogative, but it's not how things are.
And if the author meant csh or tcsh? I use tcsh myself, and the command as entered works in tcsh. So perhaps you're assuming the author meant bash when in fact they use a csh derivitive. I note that the original example doesn't specify a shell. So if we want to continue nitpicking each other's interpretation, your assumption that bash is what Cristian meant the command to be executed under, your assumption may well be incorrect. Jim -- Jim Henderson Please keep on-topic replies on the list so everyone benefits -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org