This is an old revision of the document!


Set Intersection / Set Subtraction

To find lines that are in both of two files (intersection) or in only one of the two files (subtraction), use the following commands:

# intersection of file1 and file2
grep -xF -f file1 file2
 
# subtraction of file1 from file2
grep -vxF -f file1 file2

fuss/grep.1382162946.txt.bz2 ยท Last modified: 2014/12/19 22:48 (external edit)

Wizardry and Steamworks

© 2025 Wizardry and Steamworks

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.