Here is an example based on the comment:
ex -s -c 'g/\%2l\|\%4l/pu_' -c x alfa.txt
Here is a working alternative to my original command:
ex -sc '4pu_|2pu_|x' alfa.txt
Here is an example based on the comment:
ex -s -c 'g/\%2l\|\%4l/pu_' -c x alfa.txt
Here is a working alternative to my original command:
ex -sc '4pu_|2pu_|x' alfa.txt