I have a table in a text file with tab separator and I have a sed script that selects only those strings in my file that have 83, 86, 173, 163 in second column:
sed -n '/^[^\t]\+\t\(83\|89\|147\|163\)/p' test.txt
Now I want to select all the string that have anything else, but 83, 86, 173, 163 in second column. I've tried to put ^ in different places and tried to change p to d, but did't succeed.
Can anyone help me please?
Solved my problem using ! before p:
sed -n '/^[^\t]\+\t\(83\|89\|147\|163\)/!p' test.txt
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments