[Tutor] pipes, lots of 'em
D-Man
dsh8290@rit.edu
Wed, 14 Mar 2001 10:03:09 -0500
On Tue, Mar 13, 2001 at 11:35:24PM -0800, Sean 'Shaleh' Perry wrote:
| On Tue, Mar 13, 2001 at 10:39:44PM -0800, Daniel Yoo wrote:
|
| ar p foo.ar bar|tar xfO - baz
|
| is the basic command line I need. This get bar out of the ar formatted foo.ar
| and sends it to tar which extracts baz. I want to be able to parse baz
| without it getting written to disk.
I think the problem here is the command line. Can you request tar to
output on stdout, rather than writing to disk? I know that you can
for the tarfile itself with the "f -" options. I just briefly looked
at the tar manpage but didn't find any obvious examples. Perhaps a
closer look at the manpage would help.
Alternatively, maybe you can dig into tar's sources a little and find
the functions that do the actual work. Maybe you can turn it into a
library without too much trouble?
-D