I'd like to create a list of words that need to be replaced across multiple HTML files. How can I do that?
eg. replace:
catwithdogparrotwithmonkeyfishwithtiger
across all HTML files in the selected catalog.
I'd like to create a list of words that need to be replaced across multiple HTML files. How can I do that?
eg. replace:
cat with dogparrot with monkeyfish with tigeracross all HTML files in the selected catalog.
You can place multiple sed expressions into a file, and apply them using the -f option:
-f script-file, --file=script-file
add the contents of script-file to the commands to be executed
Ex. given
$ cat > file
The cat sat on the mat.
The parrot chewed on a carrot.
The fish was just a fish.
then
$ cat > sedfile
s/cat/dog/g
s/parrot/monkey/g
s/fish/tiger/g
$ sed -f sedfile file
The dog sat on the mat.
The monkey chewed on a carrot.
The tiger was just a tiger.