can I replace text with the result of "wc" using sed?
I'm trying to send an automated report.
I have a file I want to mail to myself. In that file, I want to replace xxxx with the result of "wc -l somefile". I've tried:
sed s/xxxx/`wc -l somefile`/g message
but I get the message:
sed: -e expression #1, char 7: Unterminated `s' command
Am I missing a flag? Should it not be a s///g type of sed?
What about putting the expression in quotes:
sed 's/xxxx/`wc -l somefile`/g' message
|All times are GMT -5. The time now is 04:53 AM.|