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
Post a Comment