Você pode colocar várias expressões sed
em um arquivo e aplicá-las usando a opção -f
:
-f script-file, --file=script-file
add the contents of script-file to the commands to be executed
dado
$ cat > file
The cat sat on the mat.
The parrot chewed on a carrot.
The fish was just a fish.
então
$ 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.