tcsh script: quote and spaces problems
Rob Lahaye
lahaye at snu.ac.kr
Thu Jul 31 20:08:36 PDT 2003
Dan Nelson wrote:
>
> Actually it doesn't. You get this result because sh splits variables
> on $IFS before passing the result to a command, so what echo gets is
> argv[1]="-f \"t"
> argv[2]="\""
I come to the conclusion that there's no intuitive solution in a
tcsh script for
set foo='-f "a "'
My unix knowledge tells me the following should work:
set foo="-f\ \"a\ \ \""
but tcsh does not allow these escape sequences; the backslashes
become real backslashes and an error occurs on too many
quotes.
Another odd behaviour occurs when I say:
set foo="a b c"
which tcsh reduces to "a b c", despite the quotes.
I'd say very un-unix like behaviours....
Rob.
More information about the freebsd-questions
mailing list