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
wibble-test-genrunner(1)				      General Commands Manual					  wibble-test-genrunner(1)

NAME
wibble-test-genrunner - Code generator for wibble testsuites. SYNOPSIS
wibble-test-genrunner header <file> wibble-test-genrunner main <files> DESCRIPTION
The program generates .cpp files that are then compiled and linked into a test program for running tests from .test.h files. Examples of such .test.h files may be found among wibble headers, eg. /usr/include/wibble/regexp.test.h. In the first form, the program processes a single header file (usually of the form foo.test.h) and produces a corresponding .cpp file to be compiled. In the second form, it takes as <files> all the .test.h headers and produces a single main.cpp which contains the main() function of the test program, which then runs all the tests in all the .test.h files. The generated source code is always written to standard output and it is left up to the user to redirect it to a meaningful location. The program currently has no options other than the two forms above. The program is intended to be run as part of build process of programs or libraries using the wibble testing framework. For convenient use from CMake, there is a test.cmake script under /usr/share/wibble, that takes care of producing all the .cpp files (both per-header and the main one), compiling them and linking them into a single binary which executes the testsuite. AUTHOR
Petr Rockai <me@mornfall.net> wibble-test-genrunner(1)
All times are GMT -4. The time now is 08:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy