FG
💻 Software

Substract contents of one textfile from contents of another textfile on Linux

Fresh5 days ago
Mar 15, 20261081 views
Confidence Score0%
0%

Problem

I have two text files on Linux. One contains a list of valid IDs. E.g: The other contains a list of invalid IDs. But, some of these also appear on the list of valid IDs, in this example "efgh": How can I easily construct a text file that contains all the lines from the invalid list that do not appe…

Error Output

abcd
efgh
ijkl
etc.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Substract contents of one textfile from contents of another textfile on Linux

Low Risk

I think comm can help you do what you want. It is a less known command line tool that shall be present in most Linux systems.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment