Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
DIFF strange behavior
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Pierre  
View profile  
 More options Feb 7, 5:39 am
Newsgroups: comp.os.vms
From: Pierre <pierre....@gmail.com>
Date: Tue, 7 Feb 2012 02:39:48 -0800 (PST)
Local: Tues, Feb 7 2012 5:39 am
Subject: DIFF strange behavior
hi, I intended to use DIFF to compare 2 directories but doing so I
found something that looks strange to me. it must be me who don't
understand something.

$ type dir_1.txt
toto.txt;1
toto.txt;2
toto.txt;3
toto.txt;4
toto.txt;5
toto.txt;6

$ type dir_2.txt
toto.txt;1
toto.txt;6
toto.txt;7
toto.txt;8
toto.txt;9
toto.txt;10

obviously version 2 to 5 were deleted while versions 7 to 10 where
added.

OK, DIFF finds the differences:

$ diff/par/match=1/wid=80 dir_1.txt dir_2.txt
--------------------------------------------------------------------------- ----
File USER_DISK:[toto]dir_1.txt;1       |  File USER_DISK:
[toto]dir_2.txt;1
------------------- 2 ------------------------------------- 2
-----------------
toto.txt;2                             |
toto.txt;3                             |
toto.txt;4                             |
toto.txt;5                             |
------------------- 7 ------------------------------------- 3
-----------------
                                       |  toto.txt;7
                                       |  toto.txt;8
                                       |  toto.txt;9
                                       |  toto.txt;10
--------------------------------------------------------------------------- ----

Number of difference sections found: 2
Number of difference records found: 8

DIFFERENCES /WIDTH=80/MATCH=1/PARALLEL-
    USER_DISK:[toto]dir_1.txt;1-
    USER_DISK:[toto]dir_2.txt;1

I can list the lines deleted from dir_1.txt

$ diff/match=1/wid=80 dir_1.txt dir_2.txt/sep=master
************
File USER_DISK:[toto]dir_1.txt;1
    2   toto.txt;2
    3   toto.txt;3
    4   toto.txt;4
    5   toto.txt;5
************

Number of difference sections found: 2
Number of difference records found: 8

DIFFERENCES /WIDTH=80/MATCH=1/SEPARATED=MASTER-
    USER_DISK:[toto]dir_1.txt;1-
    USER_DISK:[toto]dir_2.txt;1

or those added to dir_2.txt :

$ diff/match=1/wid=80 dir_1.txt dir_2.txt/sep=revision
************
File USER_DISK:[toto]dir_2.txt;1
    3   toto.txt;7
    4   toto.txt;8
    5   toto.txt;9
    6   toto.txt;10
************

Number of difference sections found: 2
Number of difference records found: 8

DIFFERENCES /WIDTH=80/MATCH=1/SEPARATED=REVISION-
    USER_DISK:[toto]dir_1.txt;1-
    USER_DISK:[toto]dir_2.txt;1

but if now I want to highlight the differences in term of add/delete,
the fist command works:

$ diff/match=1/wid=80 dir_1.txt/change="-" dir_2.txt
************
File USER_DISK:[toto]dir_1.txt;1
    1   toto.txt;1
    2 - toto.txt;2
    3 - toto.txt;3
    4 - toto.txt;4
    5 - toto.txt;5
    6   toto.txt;6
************

Number of difference sections found: 2
Number of difference records found: 8

DIFFERENCES /WIDTH=80/MATCH=1-
    USER_DISK:[toto]dir_1.txt;1/CHANGE_BAR=("-")-
    USER_DISK:[toto]dir_2.txt;1

but the second don't (version 6 was not added...) :(

$ diff/match=1/wid=80 dir_1.txt dir_2.txt/change="+"
************
File USER_DISK:[toto]dir_2.txt;1
    1   toto.txt;1
    2 + toto.txt;6
    3 + toto.txt;7
    4 + toto.txt;8
    5 + toto.txt;9
    6 + toto.txt;10
************

Number of difference sections found: 2
Number of difference records found: 8

DIFFERENCES /WIDTH=80/MATCH=1-
    USER_DISK:[toto]dir_1.txt;1-
    USER_DISK:[toto]dir_2.txt;1/CHANGE_BAR=("+")

did I miss something about /CHANGE ?

TIA, Pierre.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alan Feldman  
View profile  
 More options Feb 7, 10:35 pm
Newsgroups: comp.os.vms
From: Alan Feldman <alanfeldma...@gmail.com>
Date: Tue, 7 Feb 2012 19:35:52 -0800 (PST)
Local: Tues, Feb 7 2012 10:35 pm
Subject: Re: DIFF strange behavior
On Feb 7, 5:39 am, Pierre <pierre....@gmail.com> wrote:

$ diff/match=1 dir_1.txt dir_2.txt
************
File DISK$DATA1:[FELDMAN.DIFF]DIR_1.TXT;1
    2   toto.txt;2
    3   toto.txt;3
    4   toto.txt;4
    5   toto.txt;5
    6   toto.txt;6
******
File DISK$DATA1:[FELDMAN.DIFF]DIR_2.TXT;1
    2   toto.txt;6
************
************
File DISK$DATA1:[FELDMAN.DIFF]DIR_1.TXT;1
******
File DISK$DATA1:[FELDMAN.DIFF]DIR_2.TXT;1
    3   toto.txt;7
    4   toto.txt;8
    5   toto.txt;9
    6   toto.txt;10
************

Number of difference sections found: 2
Number of difference records found: 8

DIFFERENCES /IGNORE=()/MATCH=1/MERGED=1-
    DISK$DATA1:[FELDMAN.DIFF]DIR_1.TXT;1-
    DISK$DATA1:[FELDMAN.DIFF]DIR_2.TXT;1
$

I don't know. It just does it differently in some cases.

AEF


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
hb  
View profile  
 More options Feb 8, 4:18 am
Newsgroups: comp.os.vms
From: hb <becker....@gmail.com>
Date: Wed, 8 Feb 2012 01:18:37 -0800 (PST)
Local: Wed, Feb 8 2012 4:18 am
Subject: Re: DIFF strange behavior
On Feb 7, 11:39 am, Pierre <pierre....@gmail.com> wrote:

Looks like a bug in /change which seems independent of the /match
(V8.3/Alpha).
Can you use GNV (aka GNU) diff?

$ mc psx$root:[bin]diff -u dir_1.txt dir_2.txt
--- dir_1.txt   Wed Feb  8 02:55:54 2012
+++ dir_2.txt   Wed Feb  8 02:56:38 2012
@@ -1,6 +1,6 @@
 toto.txt;1
-toto.txt;2
-toto.txt;3
-toto.txt;4
-toto.txt;5
 toto.txt;6
+toto.txt;7
+toto.txt;8
+toto.txt;9
+toto.txt;10
$


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pierre  
View profile  
 More options Feb 8, 5:19 pm
Newsgroups: comp.os.vms
From: Pierre <pierre....@gmail.com>
Date: Wed, 8 Feb 2012 14:19:48 -0800 (PST)
Local: Wed, Feb 8 2012 5:19 pm
Subject: Re: DIFF strange behavior
On Feb 8, 10:18 am, hb <becker....@gmail.com> wrote:

yes, I'll have to use GNV version :(
Pierre.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steven Schweda  
View profile  
 More options Feb 8, 8:22 pm
Newsgroups: comp.os.vms
From: Steven Schweda <sms.antin...@gmail.com>
Date: Wed, 8 Feb 2012 17:22:53 -0800 (PST)
Local: Wed, Feb 8 2012 8:22 pm
Subject: Re: DIFF strange behavior

> > Can you use GNV (aka GNU) diff?

   GNU is not GNV.

> yes, I'll have to use GNV version :(

   GNU diff for VMS does not require GNV.

      http://antinode.info/dec/sw/diffutils.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
hb  
View profile  
 More options Feb 9, 4:42 am
Newsgroups: comp.os.vms
From: hb <becker....@gmail.com>
Date: Thu, 9 Feb 2012 01:42:45 -0800 (PST)
Local: Thurs, Feb 9 2012 4:42 am
Subject: Re: DIFF strange behavior
On Feb 9, 2:22 am, Steven Schweda <sms.antin...@gmail.com> wrote:

> > > Can you use GNV (aka GNU) diff?

>    GNU is not GNV.

I know. Maybe my English is not good enough to express in a few words
that the GNV diff advertises itself as a GNU diff. Run the GNV diff
utility with -v and you will see.

> > yes, I'll have to use GNV version :(

>    GNU diff for VMS does not require GNV.

>      http://antinode.info/dec/sw/diffutils.html

The GNU diff which comes with GNV requires GNV to be installed or the
diff utility to be extracted from the GNV PCSI kit. You can run it
from the command line like

$ mc psx$root:[bin]diff -v
diff (GNU diffutils) 3.0
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/
gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Eggert, Mike Haertel, David Hayes,
Richard Stallman, and Len Tower.
$

As pointed out in another post, the GNU diff which comes with GNV does
not work with VMS file versions. That's a result of enabling a DECC
feature: DECC$FILENAME_UNIX_ONLY.  That feature is enabled for almost
all utilities which come with GNV. That doesn't really "require" GNV
but it looks like a restriction imposed by GNV. Enabling that DECC
feature for other GNU utilities for VMS very likely results in
unexpected behavior.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steven Schweda  
View profile  
 More options Feb 9, 9:55 am
Newsgroups: comp.os.vms
From: Steven Schweda <sms.antin...@gmail.com>
Date: Thu, 9 Feb 2012 06:55:07 -0800 (PST)
Local: Thurs, Feb 9 2012 9:55 am
Subject: Re: DIFF strange behavior
On Feb 9, 3:42 am, hb <becker....@gmail.com> wrote:

> As pointed out in another post, the GNU diff which comes with GNV does
> not work with VMS file versions. That's a result of enabling a DECC
> feature: DECC$FILENAME_UNIX_ONLY.  That feature is enabled for almost
> all utilities which come with GNV. That doesn't really "require" GNV
> but it looks like a restriction imposed by GNV. Enabling that DECC
> feature for other GNU utilities for VMS very likely results in
> unexpected behavior.

   And, as I demonstrated in another post, my GNU diff for
VMS does not suffer from that limitation.

   If you're looking for "another post" in this context, then
a search for:
      "Linux style diff"
may help.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »