storing todays date into a shell variable
Larry D Sorensen
larry.sorensen at juno.com
Thu Dec 16 16:39:42 UTC 2004
Have you tried:
TODAY=`date '+%m/%d/%y'`
You need the grave quotes around the statement that you want to run.
Larry
On Thu, 16 Dec 2004 12:23:08 +0530 "Mulley, Nikhil"
<mnikhil at corp.untd.com> writes:
> Hi ,
> I wanna have a shell script which puts the today's date into a shell
> variable and later use the Shell Variable for other reasons,
> I have been using like this..
>
> #!/bin/sh
> TODAY=date '+%m/%d/%y'
> echo $TODAY
> Can any one tell me what could be wrong in this...
>
> Thanks,
> Nikhil.
> °v°
> /(_)\
> ^ ^
>
> --
> redhat-list mailing list
> unsubscribe
> mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>
>
More information about the redhat-list
mailing list