I am using following command to replace yyyymmdd to YYYYMMDDHH24MISS in my file:
sed -e 's/\('yyyymmdd'\)/\('YYYYMMDDHH24MISS'\)/g' filename
After I run the command in PuTTY, it displays the file with replaced values, but they do not reflect if I more the file.
I tried using -i , but it says
sed: illegal option -- i
Can someone please suggest how do I replace the given code in multiple files and save them?
-ioption? Can you please update your question with the line that contains the-iflag please? – tachomi Feb 04 '16 at 16:15-ioption is not POSIX conformant: what system / flavor of Unix is thesedcommand being run on (Linux? BSD? OSX?) – steeldriver Feb 04 '16 at 16:27\(or the'or any of that. Your command can be written simply assed -e 's/yyyymmdd/YYYYMMDDHH24MISS/g(you can even omit the-eon some systems). – terdon Feb 04 '16 at 16:53