On Tue, 2002-02-05 at 12:16, 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'
Eh?
Try this:
curdttm=`date +%Y%m%d-%H%M`
easy enough.
NOTE: This uses the tick, not the single quote. A single quote won't do
what your're looking for.
You don't need (or want) the leading "$" when you assign the curdttm
(unless this is a perl script. You didn't say). You only want that when
you use the variable. Also, the "echo $blank|" isn't doing diddly for
you.
Have fun.
--
Ric Tibbetts
Linux registration number: 55684
If you want to help advertise Linux - point your friends to
http://counter.li.org/
Want to buy your Pack or Services from MandrakeSoft?
Go to http://www.mandrakestore.com