Hi Guys
I'm a complete noob at this so here goes I'm looking to run a perl scrip that grabs content from a remote server file and creates a separate output file for each instance
currently my script is connecting via telnet and that bit is working fine, the remote dir is "/home/webapps/mist/htdocs/mist_logs/full" I want to be able to specify a date input from the user so the correct file is searched for example the file name for Apr 2010 is "mist_log.201004" so input just needs to be year and month.also a line count for each instance as a sanity check might be good...
use Net::Telnet;
$telnet = new Net::Telnet ( Timeout=>10,
Errmode=>'die');
$telnet->waitfor('/$ $/i');
$telnet->open('server.path.com');
$telnet->login('USERID', 'PW');
local dir path /home/webapps/mist/htdocs/mist_logs/full/
then search the file "mist_log.201004" for these 3 strings
"WAS61/DB2 dhebpwas01/dhebpdb201 comexp"
"WAS6/DB2 steamboat/zirkel comexp"
"WAS61/DB2 dhebpwas01/dhebpdb201 HRS"
so the output needs to be in 3 seperate files
EVS_DHE<date>.txt for WAS61/DB2 dhebpwas01/dhebpdb201 comexp
EVS_non_DHE<date>.txt for WAS6/DB2 steamboat/zirkel comexp
and
HRS<date>.txt for WAS61/DB2 dhebpwas01/dhebpdb201 HRS
an example of HRS<date>.txt is below
thanks!!
eddie
"03/01/2010","00:00","WAS61/DB2 dhebpwas01/dhebpdb201 HRS","up"
"03/01/2010","00:15","WAS61/DB2 dhebpwas01/dhebpdb201 HRS","up"
"03/01/2010","00:30","WAS61/DB2 dhebpwas01/dhebpdb201 HRS","up"
"03/01/2010","00:45","WAS61/DB2 dhebpwas01/dhebpdb201 HRS","up"
"03/01/2010","01:00","WAS61/DB2 dhebpwas01/dhebpdb201 HRS","up"
"03/01/2010","01:15","WAS61/DB2 dhebpwas01/dhebpdb201 HRS","up"