What is the code to replace
1 in a word list in Linux, filtering off unchanged lines?
apple pig cut c@t
c@t were not in the output since no changes were expected from them.
sed '/[aosi]/!d;y/aosi/@0$1/' infile
The first command removes any line that contains none of the characters
i. The second command the translates
@0$1. Output (ignoring blank lines):
$ sed '/[aosi]/!d;y/aosi/@0$1/' infile @pple p1g