Answers for "bash print line if column value is in column of another file"

1

bash print line if column value is in column of another file

# Example usage:
awk 'FNR==NR{a[$1]=$1; next}; $8 in a {print $0;}' input_file_1 input_file_2
# This command prints rows from input_file_2 if the value in a specific
#	field of input_file_2 is found in a specific column of input_file_1.
#	With these specific numbers, this function prints the row from 
#	input_file_2 if the value in column 8 is present in column 1 of 
#	input_file_1.
Posted by: Guest on October-10-2020

Code answers related to "bash print line if column value is in column of another file"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language