1

How to solve the problem in sed?

view story
linux-howto

http://unix.stackexchange.com – 1) Get lines containing PAT1 but no PAT2 of a file (use PAT1='dog', PAT2='cat') Raw Input:- 1 cat chicken 2 bird dog apple 3 dog orange cat 4 cat juice coffee 5 cow milk dog Desired Output:- 2 bird dog apple 5 cow milk dog I am contains the two patterns that cat and dog , The dog is present the cat is absent print the line. (HowTos)