Use the -n option to suppress output and the p substitution flag displays any line that has been modified. Use the two together produces output only for lines that have been modified by the substitue command.
# sed -n 's/whaling/tuna/p' data1.txt
a tuna voyage; this the invisible police officer of the Fates, who has the
going on this tuna voyage, formed part of the grand programme of Providence
put me down for this shabby part of a tuna voyage, when others were set
By reason of these things, then, the tuna voyage was welcome; the great
No comments:
Post a Comment