cat cars.txt | egrep 'car1|car2'
outputs: car1: 1a
What I would like to accomplish is have an output like below using the minimal commands
1a with 1b
2d with 2e
Can I modify egrep output to match my format and do this all at once? Would you pipe to echo?
Before I do any manual processing I wanted to ensure there were no elegant unix ways of accomplishing this..