Author: George Sinclair <George.Sinclair AT NOAA DOT GOV>
Date: Wed, 10 Nov 2004 17:55:16 -0500
How can I do the equivalent of this shell script in perl? /usr/sbin/nsradmin -s server -i <<EOF . type: NSR $1; name: $2 print EOF where I'm just printing out the info to standard output and $1 and $
There are several ways. system ("/usr/sbin/nsradmin -s server -i " . <<EOF); print type: NSR $ARGV[0]; name: $ARGV[1] EOF open (ADM, "|/usr/sbin/nsradmin -s server -i") or die "Couldn't open pipe to
Author: "Reed, Irene" <Irene.Reed AT TEA.STATE.TX DOT US>
Date: Wed, 10 Nov 2004 21:22:24 -0600
Here is a perl snippet I use where I write it all out to a file first and then pipe it to the nsradmin command. I can send you the entire script if you want it. Irene Reed open (FSOUT1, ">/tmp/legfs1
Author: "Reed, Irene" <Irene.Reed AT TEA.STATE.TX DOT US>
Date: Wed, 10 Nov 2004 21:27:56 -0600
I am sorry that the spacing got off! Let me know if you want the file and I will send it out. Irene Here is a perl snippet I use where I write it all out to a file first and then pipe it to the nsrad
Author: George Sinclair <George.Sinclair AT NOAA DOT GOV>
Date: Fri, 12 Nov 2004 12:46:31 -0500
Thanks, guys. This helps a lot. I was screwing around with this the other day, and like I said, I tried all kinds of pipes and other stuff and was just getting frustrated trying to mimic the Perl end
Author: Tim Mooney <mooney AT DOGBERT.CC.NDSU.NODAK DOT EDU>
Date: Fri, 12 Nov 2004 12:07:25 -0600
In regard to: Re: [Networker] How can I do this in perl?, George Sinclair...: In the past, to get around this problem, I have used system command with the necessary arguments in a list to avoid calli
Author: "Faidherbe, Thierry" <thierry.faidherbe AT HP DOT COM>
Date: Sun, 14 Nov 2004 10:46:47 +0100
George, Somethink like that should achieve what you are trying to do : $BACKUP_SERVER=${ARGV[0]}; $TYPE=${ARGV[1]}; $NAME=${ARGV[2]}; open (QUERY, ">${BACKUP_SERVER}.tmp") || die "Cannot open '$cmd',