I need to check ftp logs (see below) for successful transfer of files. This is a bash script someone else wrote and I need to modify it. I want to use a Perl style regex like
/^125.*?baxp\.caed.*?\n250/i in any ?grep or sed or awk whichever can do this. I tried grep and egrep - they seem to match only one line at a time. I am unable to match for \n inside the pattern. What shell utility would do it? I dont want to bring in the perl interpreter just for this! Thanks for the help. Here is a portion of the ftp log. 220 Connection will close if idle for more than 5 minutes. 331 Send password please. 230 APLFTP1 is logged on. Working directory is "APLFTP1.". Remote system type is MVS. 200 Representation type is Image 200 SITE command was accepted local: dummy remote: dummy 229 Entering Extended Passive Mode (|||1818|) 125 Storing data set APLFTP1.DUMMY 250 Transfer completed successfully. 43 bytes sent in 00:00 (0.36 KB/s) local: IBMaxle.txt remote: 'baxp.caed.n950.axle(+1)' 229 Entering Extended Passive Mode (|||1819|) 125 Storing data set BAXP.CAED.N950.AXLE.G0002V00 <<<< I am interested in this and next line 250 Transfer completed successfully. 31352 bytes sent in 00:00 (139.16 KB/s) local: /users/aplftp1/scriptsrun/dummyin remote: dummy 229 Entering Extended Passive Mode (|||1820|) 125 Sending data set APLFTP1.DUMMY FIXrecfm 80 250 Transfer completed successfully. 80 bytes received in 00:00 (2.46 KB/s) 250 APLFTP1.DUMMY deleted. 221 Quit command received. Goodbye. __________________________________________ Ranga Nathan / CSG Systems Programmer - Specialist; Technical Services; BAX Global Inc. Irvine-California Tel: 714-442-7591 Fax: 714-442-2840 _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

