It is currently Tue, 30 Nov 2021 18:02:10 GMT



 
Author Message
 ? tar xvf my.tar | compress
REGARDING                ? tar xvf my.tar | compress -
I need to compress files as they are extracted from a tar archive.
I know I've seen it done before but I can't remember the syntax.  Its probably
something like "tar xvf my.tar | compress -".
Any suggestions?
-- Dave_G...@rome.itd.sterling.com


 Sat, 02 Nov 1996 21:41:35 GMT   
 ? tar xvf my.tar | compress
In article <199405171340.AA22...@ssw.rome.itd.sterling.com>,

Try this (it is kind of cumbersome, but it works):

tar xvf src.tar | perl -ne \
'$p = '\'`/usr/bin/pwd`\''; $_ =~ s/^..//; $_ =~ s/,.*//;
 if ($_ !~ ".*\/$") { system "/usr/ucb/compress -f $p/$_"; }'

of course, I am assuming /usr/bin/pwd and /usr/ucb/compress are valid.
--
-------------------------------------------------------------------------------
Andrew Tang (at...@panix.com)



 Sun, 03 Nov 1996 13:24:50 GMT   
 ? tar xvf my.tar | compress
: REGARDING                ? tar xvf my.tar | compress -
: I need to compress files as they are extracted from a tar archive.
: I know I've seen it done before but I can't remember the syntax.  Its probably
: something like "tar xvf my.tar | compress -".
: Any suggestions?

As you are posting here, I suppose you are using some version of
Solaris 2.
The answer is, no way, you can't do that with Solaris's tar.
You must grab GNUtar from somewhere in the Net. GNUtar have an option
to extract to stdout.

HOWEVER! what you are trying to do is wrong. You are trying to
compress stdin, but, to where are the compress info beeing written ?
--
regards,

Antonio Vasconcelos
@ The Lisbon $tock Exchange (BVL)           require 'std/disclaimer.ph'

<<< Anderson is a common name but 'Chang' is much more common  >>>



 Wed, 06 Nov 1996 08:07:53 GMT   
 
   [ 3 post ] 

Similar Threads

1. tar -xvf mozilla.tar = tar: directory checksum error

2. Re-Re- ? tar xvf my.tar | c

3. Wanted: rcmd host tar x_?_vqf file.tar file1 ... fileN | tar xvf -

4. tar xvf not working on new RH6.1 install

5. rsh remote dd if=/dev/rmt/0 bs=1024k | tar -xvf -

6. tar xvf not working right

7. Why is tar -xvf so slow?

8. tar -xvf (is it possible to go up directory tree)

9. Q: ** Very Simple on tar -xvf /dev/rst25 **

10. tar xvf /dev/rct0 standin stuff?


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