echo "cat dog fox" |sed -e 's/dog/cat/g' -e 's/fox/cat/g'
Select allOpen in new window
© 1996-2023 Experts Exchange, LLC. All rights reserved. Covered by US Patent
There may be only need to escape '|' character with backslash.
If these sentences contains spaces:
sed 's/\(Sentence A\)\|\(Sentence B\)/Sentence C/'