home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!convex!darwin.sura.net!uvaarpa!cv3.cv.nrao.edu!cv3.cv.nrao.edu!pshannon
- From: pshannon@iapetus.cv.nrao.edu (Paul Shannon)
- Subject: novice question: how import many lines of command output
- Message-ID: <PSHANNON.92Nov22132146@iapetus.cv.nrao.edu>
- Sender: news@nrao.edu
- Organization: nrao
- Distribution: comp
- Date: Sun, 22 Nov 1992 18:21:46 GMT
- Lines: 27
-
-
- I want to run a command from a perl program, grab the 12 or so lines
- of output, and then manipulate those lines from within the perl program.
- To be more explicit, the command (running under aix 3.2.2) is
-
- lsvg -l rootvg
-
- and the results are:
-
- rootvg:
- LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
- hd5 boot 2 2 1 closed/syncd /blv
- hd6 paging 64 64 1 open/syncd N/A
- hd8 jfslog 1 1 1 open/syncd N/A
- hd4 jfs 1 1 1 open/syncd /
- hd2 jfs 60 60 1 open/syncd /usr
- hd3 jfs 2 2 1 open/syncd /tmp
- hd1 jfs 1 1 1 open/syncd /home
- hd9var jfs 11 11 1 open/syncd /var
- hd7 sysdump 1 1 1 open/syncd /mnt
- hd10 jfs 28 28 1 open/syncd /usr/sys/inst.images
-
- I don't know how to read this output back into my program. I've
- looked through the Perl book, and I didn't see anything comparable.
- Any tips? Thanks.
-
- - Paul
-