[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

awktoperl



Well interestingly enough, it's a a large corporation and I may be
sticking my neck out a bit so major changes in system configs are out,
but we have these things in a lot of major cities. That said "no guts no
glory" and I'm feeling my way but I've made a lot of progress. Here's
what I've got so far and it works:


#!/usr/local/bin/perl -w
use Net::Telnet;
$telnet = new Net::Telnet (Timeout=>30,
      Errmode=>'die'
                    Prompt=> '/[\$%#>] $/');
# '/\$ $/i')
print "What ev do you want to check?\n";
chomp ($ev = <STDIN>);
$telnet->open($ev);
$telnet->login('$login', '$passwd');
print $telnet->cmd('cd efc');
print $telnet->cmd('pwd');
@crj = 'crj_1*';
  if ('@crj') {
    print "yes\n";
      }
  else  {
  die "not there\n";
  }
{
 #work in progress -> grep for errors - tail -f  awk 'print fields'
from a file stream
}



-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.