This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| fuss:grep [2013/10/19 06:09] – created office | fuss:grep [2025/10/21 23:26] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Set Intersection / Set Subtraction ===== | + | ====== Set Intersection / Set Subtraction |
| To find lines that are in both of two files (intersection) or in only one of the two files (subtraction), | To find lines that are in both of two files (intersection) or in only one of the two files (subtraction), | ||
| Line 10: | Line 10: | ||
| grep -vxF -f file1 file2 | grep -vxF -f file1 file2 | ||
| </ | </ | ||
| + | |||
| + | ====== Trim Commented and Blank Lines ====== | ||
| + | |||
| + | Many Linux configuration files use the hash sign (''#'' | ||
| + | <code bash> | ||
| + | grep -v -e " | ||
| + | </ | ||
| + | |||
| + | will remove ('' | ||
For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.