Kai Gro�johann writes:
 > Pete Forman <[EMAIL PROTECTED]> writes:
 > 
 > > That fails on both AIX and IRIX.  Neither support any uudecode option
 > > to write to stdout.
 > 
 > So, what does one do for those systems?
 > 
 >     tmpdir=/tmp/rcp.$$
 >     ( mkdir $tmpdir
 >       cd $tmpdir
 >       uudecode
 >       cat * )
 >     rm -rf $tmpdir
 > 
 > Whee...

Fails for files that start with '.', eg .profile.

 > Or this?
 > 
 >     ( cd /tmp ; echo "begin 644 rcp.$$" ; tail +2 ) | uudecode
 >     cat /tmp/rcp.$$
 >     rm -f /tmp/rcp.$$
 > 
 > Whee...

That should be okay.  I'd have probably plumped for sed rather than
echo and tail.

    ( "cd" /tmp ; sed "s/^begin .*/begin 644 rcp.$$/" | uudecode )
    cat /tmp/rcp.$$
    rm -f /tmp/rcp.$$

Note another gotcha that I snuck in.  In interactive shells (or those
that think they are) I alias cd to a function that emits an escape
code to change the xterm title.  Quoting the "cd" tells the shell to
use its builtin.

The next problem is of course the mess that the user is confronted
with should they try to customize rcp-methods.  :-(
-- 
Pete Forman
Western Geophysical
[EMAIL PROTECTED]

Reply via email to