It is currently Fri, 15 Oct 2021 21:58:50 GMT



 
Author Message
 tar, compress, uuencode
Hello retanos!

What I propose below has maybe been done before, but I didn't have it,
so I wrote it.

Sometimes one receives files that have gone through what I wrote in
the subject.  I wanted to be able to restore these files from within
my favourite editor in one operation.  So I wrote a command that will
recreate them from standard input.  I can then apply this command to
the region of the article or letter read without leaving the current
buffer.

If one or several files are given as arguments they are processed the
other way round.  That way files can be tared, compressed and
uuencoded right into the buffer.  I haven't yet figured out a neat
name for this, right now I use `wrap' and maybe `unwrap'.

----------------------------------------------------------------------
#! /bin/sh

if [ "$*" = "?" ]; then
        cat <<+
usage: `basename $0` file1 file2 ...
        tars, compresses and uuencodes the files to the standard output
       `basename $0`
        uudecodes, uncompresses and detars the standard input
+
elif [ "$1" ]; then
        # write
        tar cf - $* | compress | uuencode tar.Z
else
        f=/tmp/get$$.Z
        ( echo "begin 400 $f"; tail +2 ) | uudecode
        # extract, I own, stdin
        zcat $f | tar xof -
        rm -f $f
fi



 Sun, 27 Feb 1994 14:27:15 GMT   
 
   [ 1 post ] 

Similar Threads

1. Looking for uuencode/uudecode & compress/uncompress

2. Processing an compressed,uuencoded file

3. cu, compress and uuencode; data loss

4. cu, uuencode, compress - data corruption and loss

5. ? tar xvf my.tar | compress

6. Tarred/compressed copy of RedHat 5.1?

7. Tar / (Un) compress Library for Unix


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software