[Ilugc] getting file contents

  • From: binand@xxxxxxxxx (Binand Sethumadhavan)
  • Date: Tue Oct 17 18:50:53 2006

On 17/10/06, Girish Venkatachalam <girishvenkatachalam@xxxxxxxxx> wrote:

sort file1 file2 | uniq -u

You'll lose the order of the lines, though - unless they are already sorted.

Other ways:

grep -v -f file1 file2 (Assumes file1 is the smaller of the two)
diff -u file1 file2 (You need to do some post-processing)

Sorry but none of these approaches worked for me.

Indeed. http://en.wikipedia.org/wiki/PEBCAK

What exactly did you try, what did you expect to happen, and what
actually happened?

Binand

Other related posts: