sed replacing patterns with back quoted command
Hi,
I have n number of files by name something*.py...i want to replace in all the *.py files, a pattern "1r1z-a" by the last line of its own file
thus, i wrote this sed script
for i in *.py; do sed 's:1r1z-a:'`tail -1 $i`':g' $i; done
But this is not working, "sed: -e expression #1, char 15: unterminated `s' command" is the error message
Plz help
|