0

When I run:

diff -y <file1> <file2>

what is the | character telling me?

i.e.

Video_Codec_List : v210  |  Codecs Video : v210
2

As explained in the GNU diffutils documentation (using info diffutils "output formats" "side by side")

`|'
     The corresponding lines differ, and they are either both complete
     or both incomplete.

FYI the complete list of markers is given as

white space
     The corresponding lines are in common.  That is, either the lines
     are identical, or the difference is ignored because of one of the
     `--ignore' options (*note White Space::).

`|'
     The corresponding lines differ, and they are either both complete
     or both incomplete.

`<'
     The files differ and only the first file contains the line.

`>'
     The files differ and only the second file contains the line.

`('
     Only the first file contains the line, but the difference is
     ignored.

`)'
     Only the second file contains the line, but the difference is
     ignored.

`\'
     The corresponding lines differ, and only the first line is
     incomplete.

`/'
     The corresponding lines differ, and only the second line is
     incomplete.
| improve this answer | |
  • Thanks. I do seem to be getting lines that are identical but still have the | 'Title : 001 | Title : 001' – Bleakley Mar 21 '16 at 23:03
  • Hard to diagnose unless you can post a minimal example of your input files: my guess would be the files have different line endings (LF vs CR-LF) – steeldriver Mar 21 '16 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.