The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 09-27-2006
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Code:
man comm
Example (using bash, which supports process redirection)

Code:
$ cat > file_1
one
two
three
four
$ cat > file_2
three
four
five
six
$ comm -12 <( sort file_1 ) <( sort file_2 ) > file_3
$ cat file_3
four
three
Cheers
ZB