Hi,
I would like to remove all the lines in a file that contains letters (upper case) KJ at postions 6-7 from the begging on line.
an example would be:
1ABNPKJLDS9PORT_SIL 200708800 copu
1PORPKJLDUS9PORT_UYT 200700000 KLPU
1ABTPKJLDS9JOB_SIL 200708800 CPOI
1POIPKJLDUS9PO_UYT 200700000 YUTO
1ABTPTXLDS9JOB_SIL 200708800 CPOI
1POIPTXLDUS9PO_UYT 200700000 YUTO
1POIPMILDUS9PO_UYT 200700000 YUTO
Resulting file should only have:
1ABTPTXLDS9JOB_SIL 200708800 CPOI
1POIPTXLDUS9PO_UYT 200700000 YUTO
1POIPMILDUS9PO_UYT 200700000 YUTO
I am trying this, but its not working:
sed -i '/^.....KJ/d' file_name
Any help will be appreciated.
Al
I would like to remove all the lines in a file that contains letters (upper case) KJ at postions 6-7 from the begging on line.
an example would be:
1ABNPKJLDS9PORT_SIL 200708800 copu
1PORPKJLDUS9PORT_UYT 200700000 KLPU
1ABTPKJLDS9JOB_SIL 200708800 CPOI
1POIPKJLDUS9PO_UYT 200700000 YUTO
1ABTPTXLDS9JOB_SIL 200708800 CPOI
1POIPTXLDUS9PO_UYT 200700000 YUTO
1POIPMILDUS9PO_UYT 200700000 YUTO
Resulting file should only have:
1ABTPTXLDS9JOB_SIL 200708800 CPOI
1POIPTXLDUS9PO_UYT 200700000 YUTO
1POIPMILDUS9PO_UYT 200700000 YUTO
I am trying this, but its not working:
sed -i '/^.....KJ/d' file_name
Any help will be appreciated.
Al