Sponsored Content
Top Forums Shell Programming and Scripting Broke Perl Script Second pair of eyes NET::FTPSSL Post 302275987 by Styles on Monday 12th of January 2009 07:45:40 PM
Old 01-12-2009
Hi Jerry,

Thanks for the quick reply! Smilie Well stepping through like you suggested really now backs my suspicion the the regex is borked. I put 2 test files all named the same except the extension. i.e.

simple-test-case_12-01-2009-07-27-51.csv

and

simple-test-case_12-01-2009-07-27-51.err

I should of siad in my first post instead of getting no output, I'm not seeing the output as expected, here is the step through sequence, and you can see
Code:
my @lines = grep { /^simple-test-case./i } $ftps->list();

Steps through 4 times not finding the requested file and not downloading then exiting.

Code:
  DB<2> n
>>> CWD /output
<<< 250 Directory successfully changed.
main::(connect-monitor-draft-new.pl-09:98):
98:              sleep(10);
  DB<2> n
main::(connect-monitor-draft-new.pl-09:99):
99:              my @lines = grep { /^simple-test-case./i } $ftps->list();
  DB<2> n
>>> PBSZ 0
<<< 200 PBSZ set to 0.
>>> PROT P
<<< 200 PROT now Private.
>>> PASV
<<< 227 Entering Passive Mode 
>>> LIST
<<< 150 Here comes the directory listing.
<<< 226 Directory send OK.
main::(connect-monitor-draft-new.pl-09:99):
99:              my @lines = grep { /^simple-test-case./i } $ftps->list();
  DB<2> n
main::(connect-monitor-draft-new.pl-09:99):
99:              my @lines = grep { /^simple-test-case./i } $ftps->list();
  DB<2> n
main::(connect-monitor-draft-new.pl-09:99):
99:              my @lines = grep { /^simple-test-case./i } $ftps->list();
  DB<2> n
main::(connect-monitor-draft-new.pl-09:99):
99:              my @lines = grep { /^simple-test-case./i } $ftps->list();
  DB<2> n
main::(connect-monitor-draft-new.pl-09:100):
100:              foreach my $name (@lines) { 
  DB<2> n
main::(connect-monitor-draft-new.pl-09:117):
117:    $ftps->quit;
  DB<2> n
>>> QUIT
<<< 221 Goodbye.
Debugged program terminated.  Use q to quit or R to restart,

Smilie

Cheers,
Eric

Last edited by Styles; 01-12-2009 at 08:55 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Best place on the net to get Perl tutorials ?

I am looking for a full Perl course on internet (tutorial) to learn everything about Perl. I already know a bunch of programing languages. I have started Unix interests this year ever since I installed Ubuntu Linux on my PC AND I also got a job at IBM doing software distributions with... (1 Reply)
Discussion started by: Browser_ice
1 Replies

2. Shell Programming and Scripting

Need some help with this script -- extra eyes

I have two issues with this script. 1. I cannot seem to get my counters to count correctly. 2. My function to eject to CAP1 or CAP2 is hung in a loop and doens't exit back to the previous function. I would like to be able to select which cap to eject to . Each cap holds only 40 tapes, so when one... (15 Replies)
Discussion started by: gzs553
15 Replies

3. Shell Programming and Scripting

Net::SSLeay or Net::FTPSSL

Hello, I ran into an issue in one of my monitoring scripts. If I use the public ip address in my connection string everything works, but if I switch the connection string ip to 127.0.0.1 or the internal ip I get, " Connection refused at... (1 Reply)
Discussion started by: Styles
1 Replies

4. Shell Programming and Scripting

Net::Ftp in perl

I am trying to execute a script in another server, i used Net::Ftp module How to execute unix command in another server by using Net::Ftp module.. #!/usr/bin.perl ### Perl script to $ftp->login($user_name,'password') or die "Cannot login ", $ftp->message;... (2 Replies)
Discussion started by: pritish.sas
2 Replies

5. Shell Programming and Scripting

Would appreciate a quick second set of eyes on a script (regarding doing things in the background)

What I'm trying to do is leave a tcpdump running all the time on a server, and at the end of every day kill it and start a new one. For some reason my boss doesn't want to set this up as a cron job, so I've come up with the following.: #!/bin/bash PCAPFILE=/tmp/mgmt.$(date... (8 Replies)
Discussion started by: DeCoTwc
8 Replies

6. Windows & DOS: Issues & Discussions

Running perl script from a VB.NET windows service

Here is the snippet of the code that I'm trying to execute. Stat of the service does not launch perl script. OnStop works fine. Please could you help here. Public Class Service1 Protected Overrides Sub OnStart(ByVal args() As String) ' Add code here to start your service. This... (0 Replies)
Discussion started by: hansini
0 Replies

7. Shell Programming and Scripting

Have a find/replace perl script thats broke

Hello Folks, #!/usr/bin/perl use File::Find; open F,shift or die $!; my %ip=map/(\S+)\s+(\S+)/,<F>; close F; find sub{ if( -f ){ local @ARGV=($_); local $^I=""; while( <> ){ !/#/ && s/(\w+)\.fs\.rich\.us/$ip{$1}/g; print; } }... (8 Replies)
Discussion started by: richsark
8 Replies

8. Shell Programming and Scripting

Unable to get the size of remote file using Net::FTP Perl Script

Hi, I am using below piece of code to get the size of the remote file. $ftp->cwd($destination) or $error=$ftp->message; if(!$error) { $ftp->put($file) or $error=$ftp->message; print "FTP size = \n"; ... (3 Replies)
Discussion started by: FarooqOnline
3 Replies

9. Shell Programming and Scripting

Bash script to create rsa key pair

Hello all, I am setting up a cluster of Mac Pro's which need to be able to talk to a master computer, traffic between the nodes and the master needs to take place without a ssh key. I need a script that will create a security key, save it to the default place, enter the password as no password.... (2 Replies)
Discussion started by: sdl27789
2 Replies

10. Shell Programming and Scripting

Perl Net::IP not working

Experts - I have a snippet of code I can't figure out. I was hoping someone could help me here. I have a file of IPv6 address that I need to format correct. Example in: 2620:0:2d0:200::7 2620:0:2d0:200:a0:c 2620:0a:3f0:200:a0:c I need to convert them to:... (3 Replies)
Discussion started by: timj123
3 Replies
lptest(1B)					     SunOS/BSD Compatibility Package Commands						lptest(1B)

NAME
lptest - generate line printer ripple pattern SYNOPSIS
/usr/ucb/lptest [ length [count]] DESCRIPTION
The lptest utility writes the traditional ripple test pattern to the standard output. In 96 lines, the ripple test pattern prints all 96 printable ASCII characters in each position. The ripple test pattern was originally created to test printers. It is also useful for test- ing terminals, driving terminal ports, debugging, and performing tasks that require a quick supply of random data. This command is obsolete. OPTIONS
length Specifies the length of the output line in characters. 79 characters is the default. count Specifies the number of output lines. 200 lines is the default. If count is specified, length must also be specified. EXIT STATUS
The following exit values are returned: 0 Successful completion. non-zero An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscplp | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) SunOS 5.10 9 Sep 1996 lptest(1B)
All times are GMT -4. The time now is 11:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy