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!

help writting a perl script to sftp or scp files

Tags: perl, sftp, script, scp
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,
biglarrrr
Start your free trial to view this solution
Question Stats
Zone: Programming
Question Asked By: biglarrrr
Solution Provided By: Tintin
Participating Experts: 1
Solution Grade: A
Views: 282
Translate:
Loading Advertisement...
09.24.2006 at 04:35PM PDT, ID: 17588873

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.25.2006 at 08:31AM PDT, ID: 17593146

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.25.2006 at 08:09PM PDT, ID: 17598377

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.26.2006 at 07:32AM PDT, ID: 17601552

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
20080236-EE-VQP-29