quick question regarding shell scripting

srvblues00

Senior member
May 4, 2001
342
0
0
ok, I have the following unix command:

date +%m%Y

and I want to run that from a shell script and place the results in the variable $date. how can i do this? i tried (date +%m%Y) > $date but that didn't work. any ideas?
 

stndn

Golden Member
Mar 10, 2001
1,886
0
0
it actually depends on what shell you're using...
but it all boils down to this:
date = `date +%m%Y`

not sure about the backticks, but just give them a try (backticks execute shell commands and return the result to the shell script)

-487-