Howdy, I'd like to use 'printf' with '/bin/date' function on my Linux server. For example: 'printf Today is /bin/date' Result: Today is Mon Feb 8 23:57:43 IST 2010 What is the right way to put it? Thanks in advance!
Code: printf "Today is `date`\n" Note that around the "date" is a tilde ` not a single quote \n is newline \r is return Enclosed in tilde's you can put any commands you want. For example: Code: printf "Today is `date +%M%D%Y`\n" if you only want certain parts of the date.