Skip to main content
added 119 characters in body
Source Link
glenn jackman
  • 88.5k
  • 16
  • 124
  • 179

You can use grep

grep -F -x -f 'File2' -v 'File1'

Pattern of fixed--strings (-F) in File2 (-f)

Use -x to match whole lines. Otherwise "0123" in File1 would be excluded from the output due to "12" in File2.

find similar line and inverse with (-v)

You can use grep

grep -F -f 'File2' -v 'File1'

Pattern of fixed--strings (-F) in File2 (-f)

find similar line and inverse with (-v)

You can use grep

grep -F -x -f 'File2' -v 'File1'

Pattern of fixed--strings (-F) in File2 (-f)

Use -x to match whole lines. Otherwise "0123" in File1 would be excluded from the output due to "12" in File2.

find similar line and inverse with (-v)

Source Link
ctac_
  • 2k
  • 1
  • 9
  • 14

You can use grep

grep -F -f 'File2' -v 'File1'

Pattern of fixed--strings (-F) in File2 (-f)

find similar line and inverse with (-v)