Click to See Complete Forum and Search --> : date function


gsanand
12-16-2003, 04:54 PM
Hi,
I want to assign a date +%d to a variable. If i do
b='eval date +%d' --- it doesnt works....

even
b=date +%d doesnt works
as it assigns the literal 'date +%d' to b.

please advice!!

ph34r
12-16-2003, 05:29 PM
Use the backtick (`, where the ~ is) instead of the single quote like on your first example.

jim mcnamara
12-17-2003, 11:09 AM
try:

b=`date +%d`