missy041598
asked on
sh syntax
I am getting a script (in *unix) to output to file using the following:
/usr/local/bpc/bids2login -l <username> -f /etc/bpc.login.pw 2>&1 > <log> &
where log is of course the specified name of the log file... Now here's the question.. say I want the log file name to be date stamped.. so the log file name would end up being, for example, bids2login02030.log.. how would I modify the above command line to do that? I tried reading the sh man but its in typical unix speak :)
Thanks.
/usr/local/bpc/bids2login -l <username> -f /etc/bpc.login.pw 2>&1 > <log> &
where log is of course the specified name of the log file... Now here's the question.. say I want the log file name to be date stamped.. so the log file name would end up being, for example, bids2login02030.log.. how would I modify the above command line to do that? I tried reading the sh man but its in typical unix speak :)
Thanks.
ASKER
Would you be able to provide me with the new command I should use incorporating the above.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
this will name the file logFileName190601
for more options on the date comment just do a man date