Results 1 to 4 of 4
I am sure that this is a dumb question that I should know, but I can not find the answer on google and the man pages do not say. Of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-31-2009 #1
the diff command help.
The pipe "|" in the output of the "diff -y file1 file2" command confuses me, and I was hoping that someone could tell me what it means.
I know that the "<" means in file1, and the ">" means in file2, and no mark is an exact match. What I need to know is what does the "|" pipe mean. It shows two separate items that are not the same, and seams to mean that neither are in the opposite files, but why wouldn't it just have separate lines with the appropriate "<" or ">".
Or is there a switch that I am missing that can avoid this.
I rarely use the diff command, and quite often prefer the "comm" command, but I have had this come up a few times when using the "diff" command, and each time I search for that answer and never to find it.
- 04-01-2009 #2
- Join Date
- Mar 2009
The '|' means the line appears in both files and is mostly the same but something on the line is different.
cat a.a _ver="$4" cat b.b _ver="$5" diff -y a.a b.b _ver="$4" | _ver="$5"
- 04-01-2009 #3
That does make sense, but unfortunately the output that I get is completely different.
/images/new graphics /images/new graphics
/images/new graphics/banner_top.gif | /images/new graphics/BOARDS.jpg
/images/new graphics/banner_top.jpg | /images/new graphics/Message Boards Red.jpg
/images/new graphics/banner_top.psd | /images/new graphics/MESSAGE.jpg
/images/new graphics/Biglogo.jpg | /images/new graphics/Side Locker.jpg
/images/new graphics/logogreen.doc | /images/new graphics/Top graphic2.jpg
/images/new graphics/StMonicaSchoollogo.bmp | /images/new graphics/Top graphic.jpg
/images/spacer.gif | /images/old_graphics/banner_top_1.jpg
/images/swlogo.gif | /images/old_graphics/banner_top_2.jpg
/images/swlogo_trans.gif | /images/old_graphics/banner_top.jpg
- 04-04-2009 #4
can you give us the exact command where you encounter this problem so that we can see and tell you.