Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Shell Scripting' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Shell Scripting
Authored by: ktohg on Mar 13, '03 07:26:24PM

Don't wish to intrude but this will not work as expected

The semi coloen is a command delimeter so the date command will have default input and output where as the other command will have output redirected to the log file.

To accomplish what you wish you can do it two ways. (The first I belive may not be supported in every shell.

% (date ; scriptname) >> logfile.log

or

% date >> logfile.log ; scriptname >> logfile.log

[ Reply to This | # ]