try:
var=`date`
echo $var

then read the man page for date for more specifics on format.


                                                  __  _
Jacob Martinson                 |  Debian GNU/   / / (_)__  __ ____  __
[EMAIL PROTECTED]                  |               / /_/ / _ \/ // /\ \/ /
http://www.ccsi.com/~jacko      |              /___/_/_//_/ ___/ /_/ _\
[EMAIL PROTECTED]        |

On Fri, 2 Jul 1999, Brandon W. Beasley wrote:

> It's GOT to be simple, but I can't figure it out.
> 
> I just want to pass the current date to a variable in a bash script.
> 
> Do I use the 'date' command?  How do I pass output from the 'date'
> command to a variable, say $DATE,
> in a bash script?
> 
> thanks
> 
> ---------------------------------------------------------------------------
> Send administrative requests to [EMAIL PROTECTED]
> 

---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]

Reply via email to