Networker

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

2004-11-22 11:28:59
Subject: Re: [Networker] Still can't do this in Perl
From: Byron Servies <bservies AT PACANG DOT COM>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Mon, 22 Nov 2004 08:28:01 -0800
On Nov 22, 2004, at 7:58 AM, George Sinclair wrote:

I am still unable to perform the equivalent of the following simple
Bourne shell script in Perl:

#!/bin/sh
/usr/sbin/nsradmin -s orion -i -<<EOF
print type: NSR $1; name: $2
EOF

These are called "here documents" and require interpretation by the
shell processing the text.  Perl can do similar things (see Page 45 or
so of the camel book).  I don't understand why you are against a
temporary file: it is a perfectly normal unix approach.   It's easier.

Several people have posted scripts that will take care of running
nsradmin and marshaling the results into data structures for you
already.  Why not use one of them?  The one I posted was on May 7,
2004, and is in the archives.

Byron

--
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
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=