Sujet : Re: GNU diff command, was: Re: Fun trick
De : mw40171 (at) *nospam* mucweb.de (hb0815)
Groupes : comp.os.vmsDate : 22. Jan 2025, 12:58:01
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vmqmg9$vrbr$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12
User-Agent : Mozilla Thunderbird
On 1/21/25 00:34, Craig A. Berry wrote:
...
git is available for OpenVMS x86. GNV is not yet, as far as I have seen,
so it seemed worth giving a quick try with something people may already
have installed. And to be a bit pedantic, there is no "GNV diff"; there
is GNU diff, which may have been included in various GNV packages. It
is also available various other places, such as
http://www.antinode.info/dec/sw/diffutils.html
...
The GNU diff I've been using for 24 years does not have those
limitations, and also conveniently does command-line redirection:
...
$ sh sys/noproc/full
OpenVMS V8.4-2L2 on node EISNER 21-JAN-2025 08:32:02.26 Uptime 3 08:13:50
AlphaServer ES40
$ sh symb gdiff
GDIFF == "MC GNV$GNU:[USR.BIN]DIFF"
$ gdiff -v
diff (GNU diffutils) 3.5
Copyright (C) 2016 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.
$
$ gdiff x.txt;1 x.txt;2
diff: x.txt;1: no such file or directory
diff: x.txt;2: no such file or directory
$
I did not expect a GNV utility to handle VMS versions. I incorrectly assumed that decc$filename_unix_only would be required. It is not. But I do not know why it requires more than just the filenames.
$ gdiff sys$disk:[]x.txt;1 sys$disk:[]x.txt;2
diff: sys$disk:[]x.txt;1: illegal seek
$
$ copy x.txt;1 y.txt
$ gdiff -ub y.txt x.txt
diff: y.txt: illegal seek
$
$ pipe dir/full x.txt;1 |search sys$pipe format
Record format: Variable length, maximum 0 bytes, longest 39 bytes
$
$ convert/fdl="record; format stream_lf" x.txt;1 xx.txt
$ convert/fdl="record; format stream_lf" x.txt;2 xx.txt
$ gdiff sys$disk:[]xx.txt;1 sys$disk:[]xx.txt;2
0a1
huhu
$
And I do not expect that the GNV "diff (GNU diffutils)" utility does command-line redirection on VMS.
$ gdiff sys$disk:[]xx.txt;1 sys$disk:[]xx.txt;2 >x.x
diff: extra operand '>x.x'
diff: Try 'diff --help' for more information.
$
https://www.digiater.com/openvms/freeware/v50/gnudiffutils/
"This is a port of GNU diffutils 2.7.2 for OpenVMS."
It contains VMS-specific source code, which is not in the current diffutils-3.10.tar.xz.
Anyway, on systems where there is no "diff (GNU diffutils)", it seems worth to build it from the mentioned sources instead of using git - just my opinion.