I have a long list of data with 10 tab delimited columns. First two columns are the IDs. I would like to retrieve rows of selected IDs.
I started with renaming the selected IDs, so that each of them prepended with
comp-. Then I tried to extract the rows with selected IDs present in both column 1 and 2.
I was using
sed -n '/comp\-.*\tcomp\-.*/p' file. The output files were all those that met criteria, but unfortunately some of the rows with same criteria missed out in the output files.
Not sure what is happening here. Any idea? Or is there any better approach with grep/awk/sed in this case?