Thread: date stamp and desktop launcher command line?
hello!
trying coax following bit of desktop launcher command code appending date stamp (in indicated format) "log_file_"...
...without success....code:command: sh -c "/path/to/script.sh | tee log_file_`date +"%m%d%y_%h%m"`"
have tried......which yields "log_file__"...and...code:"...log_file_$(date +"%m%d%y_%h%m")"
...which appends 3 letter abbr. of today's day of week - i.e. "log_file_wed"....code:"...log_file_$(date)"
suggestions!
i have expected second version shown work, assuming tee syntax correct, never having used not @ sure that.
have shell script use cron record bbc radio2 , in use variable in file name follows:-
file=/home/user/radio/$(date +%f_%h-%m)-bbcr2.wav
, works beautifully producing file named
/home/user/radio/2011-06-29_12-23-bbcr2.wav
other thing can suggest using full pathway tee in script, ie /usr/bin/tee, or double checking tee syntax used inn script.
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] date stamp and desktop launcher command line?
Ubuntu
Comments
Post a Comment