Shell/Bash: bash return lines from one file that arent in another Example

By

Shell/Bash Example: This is the "bash return lines from one file that arent in another" Example. compiled from many sources on the internet by SimpleTutorials.org

bash return lines from one file that arent in another

# Example usage:
awk 'NR==FNR { b[$0] = 1; next } !b[$0]' input_file_1 input_file_2
# This returns all lines of input_file_2 that aren't found in 
# input_file_1

# Note, remove the ! to return all lines in common between the files



* Summary: This "bash return lines from one file that arent in another" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!

Others