bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#286938: diff: could support comparison among remote files (fwd)


From: Patricio Rojo
Subject: Re: Bug#286938: diff: could support comparison among remote files (fwd)
Date: Mon, 17 Jan 2005 18:08:01 -0500

I actually agree with you now... It was just that because of the pretty
standard use of that syntax in many programs I thought that there was
some friendly library that could have taken care of opening the right
input or output data stream.

Maybe now a version of the script that Bob indicates can be included in
the diff package as rdiff.sh or something like it? I don't know whether
that will require too much extra and unnecessary maintenance work,
though.

Anyways, thanks for your help and for considering my propositions:)...

        Pato


On Sun, 2005-01-09 at 12:23 -0700, Bob Proulx wrote:
> Santiago Vila wrote:
> > Received this from the Debian bug system:
> > From: Patricio Rojo <address@hidden>
> > Date: Wed, 22 Dec 2004 21:46:30 -0500
> > Subject: Bug#286938: diff: could support comparison among remote files
> > 
> > Package: diff
> > Severity: wishlist
> > 
> > It will be nice to be able to compare through a remote shell with a 
> > sintax typical to ssh or rsync, something like
> > 
> >              diff file.txt mycomputer.mynet.com:/tmp/file.txt
> 
> Please do not bloat diff (and by implication, cmp, cat, grep, sed,
> awk, etc., etc.) with these features.  Where would it stop?  By
> argument of the absurd would you also wishlist a fully graphical IDE
> into diff to be able to see and merge differences too?
> 
> Please no.
> 
> > to avoid using
> >              ssh mycomp.mynet.com cat /tmp/file.txt | diff file.txt -
> 
> That does not seem particularly bad to me.  There are alternatives.
> 
> If you really wanted to shorten your typing you should create a script
> to save you the keystrokes.  Something like this perhaps?  Untested.
> 
> #!/bin/sh
> # usage: sshdiff file file
> trap 'rm -f $TMPFILE1 $TMPFILE2' EXIT
> F1="$1"
> case $1 in
>     *:*)
>       TMPFILE1=$(mktemp -t sshdiff.XXXXXX) || exit 1
>       scp -q $1 $TMPFILE1 || exit 1
>       F1=$TMPFILE1
>       ;;
> esac
> F2="$2"
> case $2 in
>     *:*)
>       TMPFILE2=$(mktemp -t sshdiff.XXXXXX) || exit 1
>       scp -q $2 $TMPFILE2 || exit 1
>       F2=$TMPFILE2
>       ;;
> esac
> diff $F1 $F2
> 
> Bob
-- 
 ----------------------------------------------------------------
      . .         /.
     .       *   /`'\  .                          Patricio Rojo
        .       /    ./ \..         516 Space Sciences Building
             ../   .'      \.                Cornell University
          ../    /    ../    \                 Ithaca, NY 14853
        ./     ./   ./        \                   (607)255-6438
      ./     ./            \   \.        address@hidden
 ----------------------------------------------------------------
 
 http://www.gnu.org/philosophy/no-word-attachments.html





reply via email to

[Prev in Thread] Current Thread [Next in Thread]