I have a text file (around 15000 lines) that is supposed to contain two fields separated by a Tab in each line.

Is there a way to display the lines that do not contain a Tab separating the two fields?

  • 2
    awk '!/\t/' file...
    – jasonwryan
    Feb 11, 2016 at 7:56

1 Answer 1


please try this i hope this is helpful for you

grep  -Pv '\t' "test.txt"

"v" option is use to invert matching and "P" for pattern

in below image last two line not contain tab

enter image description here

  • please approve my ans :) @Snowbell
    – Tiger
    Feb 11, 2016 at 8:44
  • is there a tool on this forum to approve your answer? I don't know. I have just started using this forum
    – Upendra01
    Feb 11, 2016 at 9:25
  • see this image i.sstatic.net/LkiIZ.pngwe also get reputation
    – Tiger
    Feb 11, 2016 at 9:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .