How to export the matched text to log file?

G

gunajoe

Hi,

I am just now learning the PERL scripts .
Using the ERL scripts i will be logging into another remote device and
exceccuting some commands.
So i want to export the results of the commands executed on the remote
device.

i will explain wat i actually want.
A simple example:
if i am doing FTP in to a machine and view the files available

My query is how to save the list of files displayed,in to a log
file.
Can any one please help me on this.

Regards,
F Joe Gladston.
 
A

A. Sinan Unur

Using the ERL scripts

What is an ERL script?
if i am doing FTP in to a machine and view the files available

My query is how to save the list of files displayed,in to a log
file.
Can any one please help me on this.

perldoc -f open
perldoc -f print

perldoc Net::FTP

http://search.cpan.org/~gbarr/libne..._I_debug_my_scripts_that_use_Net::*_modules_?

Write a short script that connects to a server, gets a list of files,
and writes the list to a file. Then, post your code here, after
having read the posting guidelines, to get help.

Sinan
--
A. Sinan Unur <[email protected]>
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
 
D

David Squire

Hi,

I am just now learning the PERL scripts .
Using the ERL scripts i will be logging into another remote device and
exceccuting some commands.
So i want to export the results of the commands executed on the remote
device.

i will explain wat i actually want.
A simple example:
if i am doing FTP in to a machine and view the files available

My query is how to save the list of files displayed,in to a log
file.
Can any one please help me on this.

It's pretty much impossible to help if you don't post an actual example
Perl program showing what you are having trouble with. Check out the
posting guidelines for this group. They are posted here regularly, and
are also available at:
http://www.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html

Following them will help you to ask a question that maximizes your
chances of getting help.

The short answer to your question is that you need to capture the output
of those commands, then print it to a file, but at this stage it is
impossible to know what you are having trouble with.

DS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top