Hello,
I've been trying to include the quote () characters and spaces into a tcsh script
variable; for already two days I've been trying various ways doing this to no avail!
I'm about to think that it is impossible.
For example:
#!/bin/tcsh
set flag=-f t
On Thu, 2003-07-31 at 21:42, Rob Lahaye wrote:
When I use
set flag='-f t '
When I echo this out, I get what you are wanting...
can you show us how you are using this, to get the weird behavior?
Thanks
MeM
___
[EMAIL PROTECTED] mailing list
Rob Lahaye wrote:
[ ... ]
Any solutions for this problem with quotes and spaces in tcsh script?
Or is tcsh not suitable for this kind of things?
Ugh, the latter. :-) /bin/sh handles nested quoting right, but crunches the
space together:
% foo=-f \t \
% echo $foo
-f t
% foo='-f t '
% echo
ok ok... I noticed one thing while playing with this...
the script hello.sh
#!/bin/tcsh -f
set JUNK='-f t '
echo ${JUNK}
echo ${JUNK}
The first echo prints it -f t
and the second -f t
Can you use it with the double quotes around it?
later
MeM
On Thu, 2003-07-31 at 22:12, Michael E.
In the last episode (Jul 31), Chuck Swiger said:
Rob Lahaye wrote:
[ ... ]
Any solutions for this problem with quotes and spaces in tcsh
script? Or is tcsh not suitable for this kind of things?
Ugh, the latter. :-) /bin/sh handles nested quoting right, but crunches
the space together:
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
In the last episode (Aug 01), Rob Lahaye said:
Another odd behaviour occurs when I say:
set foo=abc
which tcsh reduces to a b c, despite the quotes.
This works for me (-CURRENT).
$ tcsh
dan: {3001} set foo=abc
dan: {3002} set | grep foo
_ set foo=a