Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash remove rows with blank field

# Basic syntax:
awk -F'delimiter' '$column# != ""' input_file

# Example usage:
awk -F'	' '$3 != ""' input_file
# This prints every line in which the 3rd tab-delimited column is 
# not blank. Change the 3 to any column and/or add other conditions 
# for your application
Source by www.unix.com #
 
PREVIOUS NEXT
Tagged: #bash #remove #rows #blank #field
ADD COMMENT
Topic
Name
2+9 =