Languages and Scripting

Re: hp-ux script for ftp .gz files from ftp

 
pankaj gupta delhi
Frequent Advisor

hp-ux script for ftp .gz files from ftp

we want a script that first compress a series of files.xx to files.gz then it transfer by ftp all things we need to create a script and then assign to cron job.please help
6 REPLIES 6
Dennis Handly
Acclaimed Contributor

Re: hp-ux script for ftp .gz files from ftp

What files do you want to gzip? All or by date?
Do you want to ftp each gzipped file, or combine all files and gzip that tar file?
James R. Ferguson
Acclaimed Contributor

Re: hp-ux script for ftp .gz files from ftp

Hi:

A search of this forum for 'ftp' scripts and will return a number of offerings. Once you have the script, created a 'crontask' is as simple as reading the manpages.

Regards!

...JRF...
pankaj gupta delhi
Frequent Advisor

Re: hp-ux script for ftp .gz files from ftp

all zip files
Arturo Galbiati
Esteemed Contributor

Re: hp-ux script for ftp .gz files from ftp

Hello,
a possible way to go ahead is to create a script with in input the file name. This script will compress and trasnfer the file by ftp.
Once you have it you can incapsulate it into another script that defined the files to be compresed and trasnfer by ftp.
HTH,
Art
Dennis Handly
Acclaimed Contributor

Re: hp-ux script for ftp .gz files from ftp

>all zip files

Not sure which of my N questions you were answering?
RC Park
Frequent Advisor

Re: hp-ux script for ftp .gz files from ftp

Hi, Just a few thoughts on UNIX scripting:

1. You 1st must have a proven manual process that you understand. Forget scripting until you can do manually what you want in a sample format (if you're moving 100 files, strip that down to 5 for your POC (proof of concept).
2. Observe which parts of the process appear to be constant and those which vary. The constant parts form the core of your code, the variants become sujects of the code to be processed (such as a list of files).
3. Learn the various methods (there are several effective ones) for processing a list of items and acting upon the variables. For loops, while loops, if-then, etc...
4. Figure out how you can safely run your code against real objects to real systems, and you're off to the races. Once you've figured things out for the short list, the rest is easy!

RCP