Advertisement

09.22.2006 at 02:13PM PDT, ID: 21999808
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.8

help writting a perl script to sftp or scp files

Asked by biglarrrr in Perl Programming Language

Tags: , , ,

Hi,

I need some help with writting a perl script. Here is what I need to do:
1. I need to pull down a bunch of files from an ftp server on a schedulable basis (mainly daily). The file names are all very similar in that they all start with trmasterbuild (e.g. the full file name would be something like trmasterbuild_1234.987654321).

2. The file transfer needs to be secure.

3. Once I pull the files from the ftp server i need to be able to delete the files I just pulled down on the ftp server (e.g. ftp file then delete file on ftp server).

4. Before I delete the file on the ftp server I need to do some kind of verification that the file I just ftped is correct. checksum???

The problem I have is that I've never written a perl script in my life and I can't seem to find any examples. I have found documentation on perl but it doesn't get into much detail on net:sftp or net::scp. All I've found was just plain documentation without examples. That's the other problem I have is that I really don't know if I should use sftp or scp or what. I've written a simple sh that will sftp the files over but it doesn't do what I need most; it doesn't do any verification on the files. Here is the sh I wrote:

#!/bin/sh
HOST='hostname.com'
FILE='*.*'
cd /home/user1/HI0001

sftp $HOST <<END_SCRIPT
cd /user1/dsisap/HI0001
prompt
mget  /home/user1/HI0001/$FILE
quit
END_SCRIPT
exit

Thanks,
biglarrrrStart Free Trial
[+][-]09.24.2006 at 04:35PM PDT, ID: 17588873

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.25.2006 at 08:31AM PDT, ID: 17593146

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.25.2006 at 08:09PM PDT, ID: 17598377

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Perl Programming Language
Tags: perl, sftp, script, scp
Sign Up Now!
Solution Provided By: Tintin
Participating Experts: 1
Solution Grade: A
 
 
[+][-]09.26.2006 at 07:32AM PDT, ID: 17601552

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44