given file test and its content:
bcd://dfl
sf
I would like to append extra information to the line having certain content (starting with bcd) While the following script works
awk '/bcd*/ {print $0", extra information"} ' test > test.old && mv test.old test
it removes the non matching lines. (sf)
Is it possible to preserve them in the output file?