Something which has been gnawing at me. I want to run a sed operation on a file / list of files, save the changes whilst keeping the original file name.
eg
Code:
$ sed '*******' file1 > file1
I'd assume this would overwrite the original file.
I've tried adjusting the noclobber settings, but I still get a file of size zero bytes.
Would the best bet be to append to say file2 , then delete the original ( file1 ) and rename file2 as file1 ?
Basically I have a directory full of html files and I need to delete specific lines but to retain the original file names as the files are hyperlinked with each other
Perhaps it could be done in Perl, but I already have the working sed syntax .
At present this sed problem is the rate limiting step in the overall shell script completion.
cheers
uncle.
ps : It is not homework !!! If only I was that young again !