|
exclude multiple records
Hi
I need to exclude multiple records in file .Using grep -v ,can exclude that record
Ex: If want to exclude 0012777201,0012777202
use grep two times .Is there any command to achive this through single command ?( cann't use grep multiple times if need to exclude multiple records in husge file)
grep -v 0012777201 a.txt >a1.txt
grep -v 0012777202 a1.txt >a2.txt
a.txt
====
20080331|2505|0012777201|1|U|U|U|
20080331|2505|0012777202|1|U|U|U|
20080331|2505|0012777204|1|U|U|U|
20080331|2505|0012777205|1|U|U|U|
20080331|2505|0012777206|1|U|U|U|
Thanks,
MR
|