Looking for a multiple editor

Linux for blind general discussion blinux-list at redhat.com
Wed Mar 30 15:50:59 UTC 2022


For safety's sake, I _strongly_ recommend that you:

- create a working directory and two sub-directories
- copy all of your text files to one sub-directory
- put the output files into the other sub-directory
- do a test run or two before the production run
- save the input files until you're sure all is OK

- Rich Morin

P.S.  sed is actually rather programmable, though it's rather like an assembly language.
If you need to do fancier checks and such, you might want to consider using awk.


> On Mar 30, 2022, at 08:11, somoene (?) wrote:
> 
> This sounds like a job for sed.
> #!/bin/ksh
> 
> for i in `ls files.*`
> do
> cat $i | sed -e "s/Mike/Joe/g" > /tmp/file$$
> mv /tmp/file$$ $i
> done



More information about the Blinux-list mailing list