OK, if this test works then the code I posted previously should work:
Code:
#!/usr/bin/perl
$network = '2.0.0.0/8';
my $dnsoptions = `./getzoneprof -u Xx -p Xx -a $network -o Orig`;
#print $dnsoptions;
@dnsoptions = split(/\r?\n/, $dnsoptions);
print "$_\n" for @dnsoptions;
That should print the same exact thing as previously. If it does this should work:
Code:
my @revlist = `./getrevlist.exe -u xx -p xx -o Orig`;
open(my $out, ">final-results.txt") or die "Could not open output: $!\n";
foreach(@revlist) {
next unless /,(.*)$/;
my $network = $1;
print "Checking $network\n";
my $dnsoptions = `./getzoneprof.exe -u xx -p xx -a $network -o Orig`;
my ($Option, $AllowUpdate, $ACLTemplate, $Other) = ('*none*', '*none*', '*none*', '*none*');
my $flag = 0;
my @dnsoptions = split(/\r?\n/,$dnsoptions);
foreach my $line (@dnsoptions){
last if $flag == 2;
if ($flag == 1) {
if ($line =~ /^\s*allow-update=([^\r\n]+)/) {
$AllowUpdate = $1;
}
elsif ($line =~ /^\s*ACL Templates=([^\r\n]+)/) {
$ACLTemplate = $1;
}
elsif ($line =~ /^\s*other=([^\r\n]+)/) {
$Other = $1;
}
elsif ($line =~ /^[A-Z]/) {
$flag = 2;
}
}
elsif ($line =~ /^Sark DNS 4.X ([^\r\n]+)/) {
$Option = $1;
$flag = 1;
}
}
print $out "$network\n";
print $out "Under Sark DNS 4.X Options field found, ",
"allow-update is set to $AllowUpdate with the values Template Name=$ACLTemplate ",
"and other=$Other\n";
}
If it does not work I don't know why. My guess is that getzoneprof.exe may not be returning data (or the same data) for every network you are checking.
Hi Wise UNIX Crew,
I want to add 3 different columns to the file in which:
1. The first new column pulls in today's date and time
2. Second column one has a '0'
3. Third column has the word 'ANY' going down the column
If my file content is as follows:
"7","a","abc",123"... (1 Reply)
I have CSV file that contains data in the format as shown below:
ABC, 67, 56, 67, 78, 89, 76, 55
PDR, 85, 83, 83, 72, 82, 89, 83
MPG, 86, 53, 54, 65, 23, 54, 75
..
..
..
..
I want to create a script that will pull out the rows from the above sheet and paste it into another CSV file.... (12 Replies)
I am trying to print file information using ffmpeg tool in perl
Here is my code
use strict;
use warnings;
use IPC::Open3;
# example
my $filename = $ARGV;
my %videoInfo = videoInfo($filename);
print "duration: " . $videoInfo{'duration'} . "\n";
print "durationsecs: " .... (0 Replies)
Hi
I have a perl script that prints all the video and audio file information(playing duration).
It works fine in one of my friends linux laptop.
But it doesn't work in my both windows and linux.
My friend told me I have to do install some module ( ppm instal ...... )
but I have no... (1 Reply)
So i'm trying to write a perl script that logins into a network switch via ssh:
#sh ip traffic
IP statistics:
Rcvd: 1460119147 total, 563943377 local destination
0 format errors, 0 checksum errors, 48401998 bad hop count
0 unknown protocol, 8379279 not a gateway
... (2 Replies)
Hi,
I have c file which contains more number of tests. two or more tests in one c file. I have the XMl data regarding tests. i need to add this xml data to c file at before the test. I know which file having which test and i created hash table for that. so the problem is i have to add information... (13 Replies)
I need to grab information from the output of the ps command.
For each line of ps output that contains _progres -b I need to get the word that follows -p. The "-p" can be anywhere after "_progres -b".
Using grep to select the correct lines is no problem (e.g. ps -ef|grep "_progres \-b|grep -v... (3 Replies)
My scenario is as follows.
1. I have a reference file with the IP addresses and names
$ cat ref.list
10.11.xxx.xxx AA
10.12.xxx.xxx BB
10.13.xxx.xxx CC
10.14.xxx.xxx DD
2. A script runs and gets me one of the IP addresses and puts it in a separate file, for e.g... (2 Replies)
In the below perl code I am using tags within each line to extract certain information. The tags that are used are:
STB >0.8 is STRAND BIAS otherwise GOOD
FDP is the second number
GO towards the end of the line is read into an array and the value returned is outputed, in the first line that... (1 Reply)
Discussion started by: cmccabe
1 Replies
LEARN ABOUT CENTOS
paps
PAPS(1) General Commands Manual PAPS(1)NAME
paps - UTF-8 to PostScript converter using Pango
SYNOPSIS
paps [options] files...
DESCRIPTION
paps reads a UTF-8 encoded file and generates a PostScript language rendering of the file. The rendering is done by creating outline curves
through the pango ft2 backend.
OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is
included below.
--landscape
Landscape output. Default is portrait.
--columns=cl
Number of columns output. Default is 1.
--font=desc
Set the font description. Default is Monospace 12.
--rtl Do rtl layout.
--paper ps
Choose paper size. Known paper sizes are legal, letter, a4. Default is A4.
--bottom-margin=bm
Set bottom margin in postscript points (1/72 inch). Default is 36.
--top-margin=tm
Set top margin. Default is 36.
--left-margin=lm
Set left margin. Default is 36.
--right-margin=rm
Set right margin. Default is 36.
--help Show summary of options.
--header
Draw page header for each page.
--markup
Interpret the text as pango markup.
--encoding=ENCODING
Assume the documentation encoding is ENCODING.
--lpi Set the lines per inch. This determines the line spacing.
--cpi Set the characters per inch. This is an alternative method of specifying the font size.
--stretch-chars
Indicates that characters should be stretched in the y-direction to fill up their vertical space. This is similar to the texttops
behaviour.
AUTHOR
paps was written by Dov Grobgeld <dov.grobgeld@gmail.com>.
This manual page was written by Lior Kaplan <kaplan@debian.org>, for the Debian project (but may be used by others).
April 17, 2006 PAPS(1)