Cygwin - diff command does not provide output

View: New views
6 Messages — Rating Filter:   Alert me  

Cygwin - diff command does not provide output

by astro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Sir,
I am using Cygwin for the purpose of comparing files.
I tried to compare the files in two different directories and directed the output into another directory.
I could achieve this by writing a serious commands. But when I did that I gave the file name for the diff output as difffile1,difffile2 etc.,
 
But after some time "diff" command does not work correctly.
If I type diff x.txt y.txt
I simply get the result as "Files x y differ". But I am not getting the output of what exactly differ as I was getting before.
I think I have changed something.But I do not know what exactly I have changed.
The version of diff : (GNU diffutils) 2.8.7
 
Can you please help me overcoming this problem?
 
Thanks in advance
astro

RE: Cygwin - diff command does not provide output

by Dave Korn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 19 June 2006 11:21, astro wrote:

> I tried to compare the files in two different directories and directed the
> output into another directory.
> I could achieve this by writing a serious commands. But when I did that I
> gave the file name for the diff output as difffile1,difffile2 etc.,
>
> But after some time "diff" command does not work correctly.
> If I type diff x.txt y.txt
> I simply get the result as "Files x y differ". But I am not getting the
> output of what exactly differ as I was getting before.
> I think I have changed something.But I do not know what exactly I have
> changed.

  When you see those messages "Files x y differ", that means you have given
the -q option to diff.  Have you perhaps set an alias so that 'diff' now
equals 'diff -q' in your shell and forgotten about it?  The 'alias' command
will show you any aliases currently in effect.  You might also want to check
the output of the 'set' command in case you've defined 'diff' as a shell
function.


    cheers,
      DaveK
--
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


RE: Cygwin - diff command does not provide output

by astro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Dave Korn,
Thanks for your help.
As you suggested, First me too thought that it might be due to -q option in effect.
So I tried -n, -y options. But still I am getting the same message as "Files x.txt y.txt differ".

And I tried ur other suggestions alias & Set.. Here also I could not find any entries like diff.
Is there any way, I can check if all the files related to diff command are available & if so Which are the directories I should check?

Once Again, thanks for your replies.
Regards
astro

RE: Cygwin - diff command does not provide output

by Dave Korn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 19 June 2006 12:09, astro wrote:

> As you suggested, First me too thought that it might be due to -q option in
> effect.
> So I tried -n, -y options. But still I am getting the same message as "Files
> x.txt y.txt differ".

  OK, next thing is maybe it reckons your files are binary for some reason.
Try adding the -a (--text) option to your command line.

> And I tried ur other suggestions alias & Set.. Here also I could not find
> any entries like diff.

  To make absolutely sure, enter "bash -x" at a command shell, then try the
diff command again: you'll bash print out the fully-expanded version of your
command before it executes it, so if any functions or aliases are making the
problem, they'll show up there.

> Is there any way, I can check if all the files related to diff command are
> available & if so Which are the directories I should check?

cygcheck -c diffutils
cygcheck -l diffutils

[ Read the output of "cygcheck --help" for more info. ]

    cheers,
      DaveK
--
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


RE: Cygwin - diff command does not provide output

by astro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Dave Korn,

  OK, next thing is maybe it reckons your files are binary for some reason.
Try adding the -a (--text) option to your command line.


It worked after giving this parameter.
But still wondering how come this was working before even without giving -a option!!!
I thank you a lot for your help.

Regards
astro


RE: Cygwin - diff command does not provide output

by Dave Korn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 19 June 2006 13:46, astro wrote:

> Dear Dave Korn,
>
>   OK, next thing is maybe it reckons your files are binary for some reason.
> Try adding the -a (--text) option to your command line.
>
> It worked after giving this parameter.
> But still wondering how come this was working before even without giving -a
> option!!!


  Your files must have gotten some binary characters in them somehow.  You
could take a look at them using "od -c" to see what non-ASCII chars show up -
see "info od" for more.

    cheers,
      DaveK
--
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/