The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 06-25-2009
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131
Quote:
Originally Posted by Sepia View Post
Thanks but that is now doing:

,Thu Jun 25 13:04:59 BST 2009count: 3

Where 'count 3' should have four words infront of it!
hm....... strange
try: sed "s/\$/,$(date)/"
Quote:
Originally Posted by Sepia
I've tried changing the order of sed "s/$/,$(date)/" around but that doesn't seem to help.

edit: doesnt seem to be writing the date when its done as a cronjob. Just has $(date),monkey
'crontab' runs in Bourne shell - the '$(date)' is ksh/bash specific. Change '$(date)' to '`date`' in crontab - or write your own ksh/bash wrapper and call it from cron.