[techtalk] 'Nuff sed
Nancy Corbett
nancy at netleaf.com
Wed May 30 12:14:09 EST 2001
Okay...I don't get it. I'm trying to format a date using sed. When I do
the command from the command line, it works. But when I try it within the
sed statement, I get a message saying:
sed: command garbled: s/NEWDAY/Wednesday,05/30/2001/g
2
Any sed proficient folks out there who could lend a brain cell to this?
Here's the sed statement:
eval "sed s/NEWDATE/`date +%A,%m/%d/%Y`/g infile > outfile"
I've tried escaping the /s like this:
eval "sed s/NEWDATE/`date +%A,%m\/%d\/%Y`/g infile > outfile"
and get the same error. Anyone out there understand what sed's said? I
know what I said to sed when I saw this. "Say what?"
TIA,
Nancy
More information about the Techtalk
mailing list