On Thu, Aug 12, 2004 at 04:16:43AM +0200, Barno wrote:
> 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

Tcsh treats [ and ] as variable indexers. You need to quote them out.
Here's the corrected version:

    set Log="`date -v-7d '+[%d/%m/%Y:%H:%M:%S]'`"
    echo "$Log"

Jonathan Chen <[EMAIL PROTECTED]>
             "A person should be able to do a small bit of everything,
                                        specialisation is for insects"
[EMAIL PROTECTED] mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to