The command you are seeking is comm
. eg:-
comm -12 1.sorted.txt 2.sorted.txt
Here:
-1 : suppress column 1 (lines unique to 1.sorted.txt)
-2 : suppress column 2 (lines unique to 2.sorted.txt)
More Related Contents:
- How do I copy a folder from remote to local using scp?
- Useless use of cat?
- How can I reverse the order of lines in a file?
- How can I shuffle the lines of a text file on the Unix command line or in a shell script?
- How to download GitHub Release from private repo using command line
- How can I check the version of sed in OS X?
- How to kill all processes matching a name?
- How to ssh to vagrant without actually running “vagrant ssh”?
- CMake’s execute_process and arbitrary shell scripts
- Is there a “standard” format for command line/shell help text?
- Take a full page screenshot with Firefox on the command-line
- How to run SWI-Prolog from the command line?
- “No such file or directory” but it exists
- shell – remove numbers from a string column [closed]
- What’s the difference between .bashrc, .bash_profile, and .environment?
- What’s the magic of “-” (a dash) in command-line parameters?
- Shell command to sum integers, one per line?
- How to execute shell command in Javascript
- How to make grep only match if the entire line matches?
- How can I execute a command stored in a variable?
- Use grep –exclude/–include syntax to not grep through certain files
- commands not found on zsh [closed]
- Rename multiple files by replacing a particular pattern in the filenames using a shell script [duplicate]
- Concise and portable “join” on the Unix command-line
- is it possible to use variables in remote ssh command?
- Why do I get “/bin/sh: Argument list too long” when passing quoted arguments?
- What does the line “#!/bin/sh” mean in a UNIX shell script?
- How to grep a text file which contains some binary data?
- How can I pass variables from awk to a shell command?
- How can I run Cygwin Bash Shell from within Emacs?