storing current month in shell variable..
Ed Greshko
Ed.Greshko at greshko.com
Thu Dec 16 07:44:01 UTC 2004
Mulley, Nikhil wrote:
> Hi ,
> Nikhil again ... :)
> I wanna store the current month in a shell variable , for which I am attempting to do like this ...
> #!/usr/bin/sh
> MON=`(date | awk '{print $2}')
> echo $MON
> But when I execute the script , I get nothing...
> Can anyone point me in where I have gone wrong ??
Missing trailing `
MON=`(date | awk '{print $2}')`
--
"A common mistake that people make when trying to design something
completely foolproof was to underestimate the ingenuity of complete
fools."
--Ford Prefect in "Mostly Harmless".
More information about the redhat-list
mailing list