[prev in list] [next in list] [prev in thread] [next in thread] 

List:       suse-linux-e
Subject:    Re: [SLE] Scripting
From:       Kastus <NOSPAM () tprfct ! net>
Date:       2003-08-31 21:27:44
[Download RAW message or body]

On Sun, Aug 31, 2003 at 03:40:02PM -0500, Michael Satterwhite wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> This is probably either very simple or impossible. If I have a script (Perl, 
> Python, whatever), is it possible to execute an external command (say, tar 
> - -vt) and pipe the output from stdout into the script I'm currently running? I 

In perl, use something like:

open FOO, "tar tv some.tar|";
while (<FOO>) {
	...
}

HTH, -Kastus

-- 
Check the headers for your unsubscription address
For additional commands send e-mail to suse-linux-e-help@suse.com
Also check the archives at http://lists.suse.com
Please read the FAQs: suse-linux-e-faq@suse.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic