linux - UNIX command to search blank word -


in file (tab delimited text, csv or database file) have first name, last name , address. in rows not have last name first name , address there. how can list rows last name blank using unix command?

firstname lastname street city dan, god, 1st street, chicago sam, , 2nd street, chicago adam, smith, 3rd street, chicago

it csv, tab delimited text file(;,:). answer should 2nd row above.

assuming input file csv, can use awk:

awk -f, '$2 == ""' file 

to print rows 2nd columns (last name) blank.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -