Robert Goshko wrote:
> 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.
>
>
Why the echo '$blank |' ???
just the 'date +%Y%m%d-%H%M should work.
Also to answer your question, you want the backwards single quote(`)
not the forwards one(') if you want the commands in the quotes to be
replaced by the output of those commands.
-Kyle
--
_
-------------------------------ooO( )Ooo-------------------------------
Kyle J. McDonald (o o) Systems Support Engineer
Sun Microsystems Inc. |||||
Enterprise Server Products [EMAIL PROTECTED]
1 Network Drive BUR03-4630 \\\// voice: (781) 442-2184
Burlington, MA 01803 (o o) fax: (781) 442-1542
-------------------------------ooO(_)Ooo-------------------------------
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com