Hi all,

I need some help with SED. I'm trying to insert a "command"/text at the beginning of every line from one file and output to a new file like this:

sed 's/.*/clamscan -ri -l /var/log/clamav/clamav-"$1".log --move=/var/log/clamav/quarantine &/ /var/log/clamav/diff/diff.txt > /var/log/clamav/virus_scan

but sed givs me this error:
sed: -e expression #1, char 23: Unknown option to 's'

I have also tried to use the insert command i\ but it just inserts the text on a new line above each of the lines read from the file instead of just inserting the text at the beginning of each of the lines red from the file?

Can someone help me with this?

Ralph


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Reply via email to