On Thu, 10 Sep 1998, Bogdan Taru wrote:

> 
>       Hi everyone, 
>  I would like to make a script which tells me the date in this format:
> Sep 10.
>  From the command line, it's easy done with: 'date +%b" "%d'.
>  I would like the script to look like this (I know it looks stupid, but
> I'm still a newbie):
> 
> DATA=date +%b" "%d
> echo DATA
> 
>  How can I do that?

I'm not completely clear what you want, but perhaps an alias is a simpler
solution:  In the tcsh(bash has something similar)

alias date 'date +%b" "%d'

Note forward quotes, "'"

BTW if you really want to embed your two lines in a script somehow then
the tcsh requires

set DATA=`date +%b" "%d` #Note back quotes "`" 
echo $DATA

Good luck,

Gordon A. Gallup                          Dept. of Physics and Astronomy
University of Nebraska-Lincoln            Lincoln, NE 68588-0111
Voice: (402)472-1230                      FAX: (402)472-2879
http://www.unl.edu/physics/

Reply via email to