How can i find lines which contains two strings (or two charcters) let say "ABC" and "DEF".
Line: SEFGWN;BVABCFSDFBDEF
How can i find lines which contains two strings (or two charcters) let say "ABC" and "DEF".
Line: SEFGWN;BVABCFSDFBDEF
grep "ABC.*DEF" urfile
or
grep ABC urfile |grep DEF
out_file lets say consist of ur SEFGWN;BVABCFSDFBDEF
sed '/ABC/!d;/DEF/!d' out_file
awk '/ABC.*DEF/' out_file
awk '/ABC/&&/DEF/' myfile