Re: '$' in csh
- From: "Joachim Schmitz" <nospam.jojo@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 7 Jun 2007 14:30:03 +0200
"Tom Gur" <gur.tom@xxxxxxxxx> schrieb im Newsbeitrag
news:1181218415.186096.245610@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,A NonStop system? (\node.$volume.subvol)
I'm writing a program in C that runs a Java utility with several
command-line arguments.
one of the parameters that I'm passing is a home directory of a tandem
computer - which means that it contains the special character: '$'.
i.e: myprogram -path "\BLA.$DATA01.BLU"
If I'll run it literally, I'll get a: "DATA01: Undefined variable"A NonStop system with a C-Shell??
message.
what I usually do, with tcsh/bash is adding a '\' before every '$'.
i.e: myprogram -path "\BLA.\$DATA01.BLU"
but when I try to do it with csh, I still get an error message (the
same ol' "DATA01: Undefined variable")
Don't use C-Shell for scripting...
how can I get pass that ?How about single quotes instead of double quotes, e.g.
myprogram -path '\BLA.$DATA01.BLU'
In C you might still need to escape the \
system("myprogram -path '\\BLA.$DATA01.BLU'")
or
system("myprogram -path \"\\BLA.\\$DATA01.BLU\")
Bye, Jojo
.
- Follow-Ups:
- Re: '$' in csh
- From: Tom Gur
- Re: '$' in csh
- References:
- '$' in csh
- From: Tom Gur
- '$' in csh
- Prev by Date: '$' in csh
- Next by Date: Re: Change one digit to 2 digits
- Previous by thread: '$' in csh
- Next by thread: Re: '$' in csh
- Index(es):
Relevant Pages
|