The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
search a pattern and if pattern found insert new pattern at the begining pitagi Shell Programming and Scripting 7 02-12-2009 10:27 PM
modify a particular pattern starting from second line of the search pattern imas UNIX for Dummies Questions & Answers 1 10-12-2008 02:19 PM
modify a particular pattern starting from second line of the search pattern imas UNIX for Dummies Questions & Answers 2 10-12-2008 12:30 PM
SED Search Pattern and Replace with the Pattern racbern Shell Programming and Scripting 4 03-15-2008 05:59 AM
Search file for pattern and grab some lines before pattern frustrated1 Shell Programming and Scripting 2 12-22-2005 03:41 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 04-24-2009
richsark richsark is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 92
Search pattern not terminated

Hi,

What am i missing on line 16, when I run this I get
Search pattern not terminated at count-scr.pl line 16

Code:
#!perl open(my $log, ">log-subnet.txt") or die "Could not open log: $!\n"; ##### Step 1, read subnetsopen(my $in, "<names.txt") or die "Could not open names.txt: $!\n";while(<$in>) {    next unless /(.*?)\/(.*)$/;    my $subnet = $1;    print "Checking $subnet\n";    my @dnsoptions = `./object.exe -u Xxx-p Xxx -b $subnet -o rich`;        my %counts;    foreach my $line (@dnsoptions) {        my @f = split/"\s+", $line;        $counts{$f[3]}++;    }        print $log "For subnet $subnet:\n";    foreach my $k (keys %counts) {        print $log "    $k: $counts{$k}\n";    }} close($log);
Thanks
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:09 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0