On 01/12/2010 09:57, McKown, John wrote:
I download data from z/OS. And I do it repetitively. Basically, run a job on z/OS to generate a file. Download the file. Process on Linux. Repeat. I do some intermediate work on z/OS between runs. This work changes the output of the job. I want to compare the output from the various runs. I currently do this by starting up the Linux ftp client; do a runique; then get the file. This results in the ftp client creating a series of file on Linux with .1, .2, .3, and so on. What I would like to do is not need to remember to do the runique command, but have it be the client default. I cannot change the z/OS ftp server's defaults. Well, I could, but I'd catch you-know-what if I did.<grin>. Is there some way to have the Linux ftp client do this for me? Why not just depend on myself? Because I sometimes mess up. And it only takes once to overwrite a file. Is there some other way to do this?
runique/sunique aren't commands I use much, but it sounds like you'd like to download <file> to <file.1> or whatever the latest number is? Do they have to be in strict numerical order, or simply distinct names, for example file.2010-12-01. Y-M-D sort nicely and don't depend on previous filenames - throw in H-M-S if you need the granularity. As for better ftp clients, there are several; curl, wget, lftp, ncftp. The requested behaviour could be done as: wget --no-clobber ftp://server/path/file or including the date as wget --output-document "file.$(date +%F)" ftp://server/path/file See wget's --ftp-user and other authentication options to provide login credentials (and don't put passwords on the command-line where other users can see them with "ps"). Cheers, Phil ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For more information on Linux on System z, visit http://wiki.linuxvm.org/
