Extract Lines when Column K is empty with AWK/Perl
Posted
by neversaint
on Stack Overflow
See other posts from Stack Overflow
or by neversaint
Published on 2010-05-25T06:24:04Z
Indexed on
2010/05/25
6:31 UTC
Read the original article
Hit count: 245
I have data that looks like this:
foo 78 xxx
bar yyy
qux 99 zzz
xuq xyz
They are tab delimited. How can I extract lines where column 2 is empty, yielding
bar yyy
xuq xyz
I tried this but doesn't seem to work:
awk '$2==""' myfile.txt
© Stack Overflow or respective owner