Theo Pepler

Home | Research | Teaching | Software | Links | HOWTO's

HOWTO: CHECK DIFFERENCES BETWEEN TWO TEXT FILES USING THE COMMAND LINE

  1. Use the following code:

    diff -u file1 file2 | sed -n '1,2d;/^[-+]/p'

    where file1 and file2 are the names of the two files to be compared.
Source: Stack Overflow