Re: '$' in csh



"Tom Gur" <gur.tom@xxxxxxxxx> schrieb im Newsbeitrag
news:1181218415.186096.245610@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

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"
A NonStop system? (\node.$volume.subvol)

If I'll run it literally, I'll get a: "DATA01: Undefined variable"
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")
A NonStop system with a C-Shell??
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


.



Relevant Pages

  • $ in csh
    ... command-line arguments. ... one of the parameters that I'm passing is a home directory of a tandem ... but when I try to do it with csh, I still get an error message (the ...
    (comp.unix.programmer)
  • RE: IIS working with all types of pages EXCEPT .ASP
    ... Test the asp page in Low isolation (right click on site in IIS MMC-> ... Home directory tab-> Application protection). ... What is the error message in the browser when you browse a simple asp ... Microsoft Developer Support ...
    (microsoft.public.inetserver.iis)
  • RE: ssh login error
    ... I think that your problem is described in the first error message - sshd ... Is there a root's home directory /home/root in that server at the login ...
    (RedHat)
  • Re: datevalue
    ... "Govind" wrote: ... > Your first two values were within single quotes and hence they wont ... On the third format, am not sure of the reason why it doesnt work, ... >> When I try to use the function DateValue, I keep getting an error message of ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Combobox rowsource
    ... gives an error message: "runtime error 380.Could not set the Rowsource ... Invalid property value" ... the single quotes but it appears if I remove the spaces and leave the ... remove the spaces from the filename? ...
    (microsoft.public.excel.programming)