tcsh problem

Barno barno at amadeus.demon.nl
Wed Aug 11 19:16:47 PDT 2004


hello,
I've got a problem with syntax in a tcsh script.
If I type this in a tcsh shell:
date -v-7d "+[%d/%m/%Y:%H:%M:%S]"

It returns this:
[05/08/2004:04:08:48]

but when I use it in a script like this:
#!/bin/tcsh
set Log = ` date -v-7d "+[%d/%m/%Y:%H:%M:%S] `
echo $Log

it returns an error because of the [ and ].
If I remove either one of them it runs ok.

How do I get the output of the script the same as in the command line?

Thanks
Barno



More information about the freebsd-questions mailing list