DATA=`date +%b" "%d`
echo $DATA
WARNING: note the symbol used here is ` not ' that has a different
meaning
when you use ``, everything you place between these 2 symbols is
evaluated and the expression is replaced by what have been send to stdin
by this evaluation.
when you use ' ', everything between these 2 symbols is taken as a string
(and not evaluated).
Hope this help.
-----Message d'origine-----
De: Bogdan Taru [SMTP:[EMAIL PROTECTED]]
Date: jeudi 10 septembre 1998 12:55
�: linux-newbie
Objet: script
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?
Have fun,
bogdan