Creative and Strange

Tuesday, October 17, 2017

Find missing value from one file to another

To find a missing line (value) from one file compared to the other.

Using grep by combining the -v (show non-matching lines), -x (match whole lines) and -f (read patterns from file) options:
grep -v -x -f B.txt A.txt
This does not depend on the order of the files - it will remove any lines from A that match a line in B.
Posted by John Nguyen at 11:01 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Post Older Post Home

About Me

John Nguyen
View my complete profile

Blog Archive

  • ►  2020 (1)
    • ►  August (1)
  • ►  2019 (19)
    • ►  October (2)
    • ►  September (1)
    • ►  August (2)
    • ►  July (2)
    • ►  April (5)
    • ►  March (1)
    • ►  February (4)
    • ►  January (2)
  • ►  2018 (18)
    • ►  December (4)
    • ►  November (1)
    • ►  October (2)
    • ►  September (1)
    • ►  August (1)
    • ►  July (1)
    • ►  June (4)
    • ►  May (2)
    • ►  February (1)
    • ►  January (1)
  • ▼  2017 (19)
    • ►  December (1)
    • ►  November (3)
    • ▼  October (7)
      • Output Result from df Command STDOUT to HTML
      • Disable/Delete Inactive AD Users
      • Inkscape crashes every time opening existing svg file
      • Banshee lost sound after HDMI usage
      • Find missing value from one file to another
      • Ubuntu free up /boot to upgrade
      • Pitfall of Ubuntu 14.04 to 16.04 Upgrade
    • ►  September (2)
    • ►  August (5)
    • ►  July (1)
The Home of the MedievalHellSpawn. Awesome Inc. theme. Powered by Blogger.