The UNIX and Linux Forums  

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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 11-19-2008
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,926
It seams the ShowQueues_leaiprod.sh sometimes returns an output different from the one you posted. You may need to add an error checking there.

This should be a workaround:

change:


Code:
while (<QUEUE>) {
  my $Flag = 0;

to:


Code:
while (<QUEUE>) {
  next unless /\w+\s+/;
  my $Flag = 0;

I'm sure the checking logic should be modified, but I'll need more details to understand how.