home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / perl / 7094 < prev    next >
Encoding:
Text File  |  1992-11-22  |  1.5 KB  |  39 lines

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