Le Mardi 5 F�vrier 2002 21:16, vous avez �crit :
> I have a line from one of my shell scripts to load the current date and
> time into a variable:
>
>      $curdttm = 'echo $blank |date +%Y%m%d-%H%M'
>
> I have used this on both AIX and HP-UX and it has worked great.
>
> Doesn't do diddly on my Linux box but set the $curdttm variable to a
> value of $'echo $blank |date +%Y%m%d-%H%M'.
>
> I know someone out there will have another way to do this.
>
> Thanks.

$ curdttm=$(date +%Y%m%d-%H%M)

gives for me:
$ echo curdttm
20020206-0041

bye
jipe



-- 
J'ai l'orgueil des vices qu'on me prete;
je suis moins fier des vices que j'ai.
        -- Jean Cocteau

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to