Skip to main content

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_"...

code:
command: sh -c "/path/to/script.sh | tee log_file_`date +"%m%d%y_%h%m"`"
...without success....

have tried...
code:
"...log_file_$(date +"%m%d%y_%h%m")"
...which yields "log_file__"...and...

code:
"...log_file_$(date)"
...which appends 3 letter abbr. of today's day of week - i.e. "log_file_wed"....

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

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support