use double quotes instead of single in your sed command. On Mon, Feb 9, 2009 at 11:51 PM, Nelson Serafica <[email protected]>wrote:
> I have downloaded fileschanged to monitor all changes in my /home/billing > directory. Here is the output when there is changes > > R /home/billing/test # R = remove > A /home/billing/test # A = added > > I want to append time to the logs. I did it using sed. However, I cannot > execute commands using sed or is there a way using sed to do it? Here is the > sample scripts I did > > #!/bin/bash > > date=`/bin/date +%F` > > fileschanged -rap /home/billing | sed 's/$/\$date/' & > > Here is the output of the script: > > R /home/billing/textfile$date > > Instead of showing the executed commands, it show the variable $date > instead of 2009-02-10. Is there a way to show the commands instead of the > variable? > > > > > -- > Nelson Serafica > > http://nelsonts.blogspot.com > > > > -- Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Linux Users Group. To post a message, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit our group at http://groups.google.com/group/linuxusersgroup -~----------~----~----~----~------~----~------~--~---
