Networker

Re: [Networker] Still can't do this in Perl

2004-11-22 11:56:25
Subject: Re: [Networker] Still can't do this in Perl
From: Davina Treiber <Treiber AT HOTPOP DOT COM>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Mon, 22 Nov 2004 16:54:12 +0000
George Sinclair wrote:
I am still unable to perform the equivalent of the following simple
Bourne shell script in Perl:


I've tried all kinds of options involving '.', '-' characters. How can I
do this? Seems so easy and yet so frustrating.

It is fairly easy. You can use something similar to this example:

#!/usr/bin/perl

open NSRADMIN, "echo  \"show name
                       print type: NSR client\" | nsradmin -i - |";
while (<NSRADMIN>) {
        print; # or process as you wish
}
close NSRADMIN;

--
Note: To sign off this list, send a "signoff networker" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list. Questions regarding this list
should be sent to stan AT temple DOT edu
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=