Is there an Awk or Perl single line that can delete all lines that do not have complete data. I often need something like this. For example, I currently have a tab delimited file that looks like this:
1 asdf 2 9 asdx 4 3 ddaf 6 5 4 2 awer 4
How to delete a row that does not matter in field 2?
How to delete a line that does not matter in one of ANY field?
I tried to do something like this:
awk -F"\t" '{if ($2 != ''){print $0}}' 1.txt > 2.txt
Thanks.
source share