Re: '$' in csh



On Jun 7, 3:30 pm, "Joachim Schmitz" <nospam.j...@xxxxxxxxxxxxxxxxxx>
wrote:
"Tom Gur" <gur....@xxxxxxxxx> schrieb im Newsbeitragnews: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

Thanks ! single quotes works.

.



Relevant Pages

  • 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)
  • Re: Default XML Receive pipeline
    ... I get this error message: ... This is only when I receive an XML message with this XML Declaration: ... The XML Disassembler component doesn't like it when the "encoding" attribute ... of the declaration is wrapped in single quotes as opposed to double ...
    (microsoft.public.biztalk.general)
  • Re: $ in csh
    ... 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 ... How about single quotes instead of double quotes, ...
    (comp.unix.programmer)