Author: George Sinclair <George.Sinclair AT NOAA DOT GOV>
Date: Mon, 22 Nov 2004 10:58:16 -0500
I am still unable to perform the equivalent of the following simple Bourne shell script in Perl: /usr/sbin/nsradmin -s orion -i -<<EOF print type: NSR $1; name: $2 EOF I invoke this as: ./nsradmin.sh
Author: Byron Servies <bservies AT PACANG DOT COM>
Date: Mon, 22 Nov 2004 08:28:01 -0800
I am still unable to perform the equivalent of the following simple Bourne shell script in Perl: /usr/sbin/nsradmin -s orion -i -<<EOF print type: NSR $1; name: $2 EOF These are called "here documen
Author: Davina Treiber <Treiber AT HOTPOP DOT COM>
Date: Mon, 22 Nov 2004 16:54:12 +0000
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: open NSRADMIN
Author: Tim Mooney <mooney AT DOGBERT.CC.NDSU.NODAK DOT EDU>
Date: Mon, 22 Nov 2004 11:26:01 -0600
In regard to: [Networker] Still can't do this in Perl, George Sinclair said...: I am still unable to perform the equivalent of the following simple Bourne shell script in Perl: /usr/sbin/nsradmin -s
Ouch. I think I suggested that without testing. That won't work at all. There, the command is passed on the command line, not as stdin. There's no 'print' at the beginning of the command. It should
Author: George Sinclair <George.Sinclair AT NOAA DOT GOV>
Date: Wed, 24 Nov 2004 10:13:35 -0500
Thanks for asking. Well, here's a very short draft of a script I came up with that avoids using temporary files or more advanced things like Open2 or Open3 modules. In my testing, I've been invoking
Author: Davina Treiber <Treiber AT HOTPOP DOT COM>
Date: Wed, 24 Nov 2004 15:19:29 +0000
George, Try a bit of sideways thinking. You are piping IN to the nsradmin command but losing the output. Isn't it more useful to put the input to nsradmin in a variable, then open the nsradmin comman
Umm, that is *NOT* the way I would write that. You're forking off a child, but you give no indication that you're running multiple threads in here. Becuase you don't run a conditional on the $result
Author: George Sinclair <George.Sinclair AT NOAA DOT GOV>
Date: Fri, 26 Nov 2004 17:19:32 -0500
Okay, I tried suggested code, but with taint mode turned on as shown below and invoked as: 'script.pl name client'. I have a question, though, about how to NOT invoke shell (security) as discussed fu
It happens here becuase you're passing the command and arguments as a single string, the shell is invoked to parse the bits. You can parse them yourself and pass them as an array rather than a strin
Author: George Sinclair <George.Sinclair AT NOAA DOT GOV>
Date: Fri, 26 Nov 2004 18:47:18 -0500
Good point. Guess it reached that quite some time back, though. Sorry to have protracted this. Thanks. George -- Note: To sign off this list, send a "signoff networker" command via email to listserv