bash: Ex editor in pipelines

Use the -s flag to hide warnings and the -c flag to provide an ex command line to run:

ex -s -c '%s/Hi/Bye/' -c '%p|q!' <(echo Hi)

In a pipeline, refer to stdin:

echo Hi | ex -s -c '%s/Hi/Bye/' -c '%p|q!' /dev/stdin
Published on: 07 Feb 2022