thanks for your explanation. i have a doubt, i have below log file. how to grep only lines which has MOD or DEL only and pipe into a new file. can you please help me. 18/Aug/2010:08:30:39 +0000 conn=108559 op=3375 msgId=3376 - RESULT err=0 tag=120 nentries=0 etime=0 18/Aug/2010:08:30:39 +0000 conn=105611 op=38083 msgId=38084 - EXT oid="1.3.6.1.4.1.42.2.27.9.6.8" 18/Aug/2010:08:30:39 +0000 conn=105611 op=0 msgId=38084 - MOD dn="uid=cpb4tpz1,ou=users,o=dhl.com" 18/Aug/2010:08:30:39 +0000 conn=105611 op=0 msgId=38084 - RESULT err=0 tag=103 nentries=0 etime=0 csn=4c6c19c100020c1d0000 18/Aug/2010:08:30:39 +0000 conn=105611 op=38083 msgId=38084 - RESULT err=0 tag=120 nentries=0 etime=0 18/Aug/2010:08:30:39 +0000 conn=105611 op=38084 msgId=38085 - EXT oid="1.3.6.1.4.1.42.2.27.9.6.5" 18/Aug/2010:08:32:37 +0000 conn=108681 op=0 msgId=95 - DEL dn="cn=asia,cn=mydigi.maxis.com.my,cn=meta-directories,cn=join
In reply to Re^2: what is grep command for and condition
by anakin30
in thread OT: what is grep command for and condition
by anakin30
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |