I have a text file in my linux server with these characters;
ID DATA
MF00034657,12435464^DRogan^DPUM-DT_MAX_1234;PUM-DT_MAX_1234;PUM-DT_MAX_1234;PUM-DT_MAX_1234;PUM-DT_MAX_1234;M-DT_MAX_1;
MF00056578,12435464^DRogan^DPUM-DT_MAX_1234;PUM-DT_MAX_1234;PUM-DT_MAX_1234;PUM-DT_MAX_1234;PUM-DT_MAX_1234;UM-DT_MAX_123;
Now I need to filter the lines that do not contain "PUM-DT_MAX_1234", and save in another file with the identifier
Like this
MF00034657,M-DT_MAX_1
MF00056578,UM-DT_MAX_123
I use
grep -v 'PUM-DT_MAX_1234' file > file.out
awk '!/PUM-DT_MAX_1234/' file > file.out
but does not work
any suggestions
thank!
source
share