A bit of a silly title, but I want to do something that some might
consider "abusing" ftp. Anyway, at present, I transfer files from z/OS
to Linux using ftp. I could use SSH, but choose not to because SSH
chews up more CPU on the z/OS side. And CPU is precious there. What I
do at present is basically:

#!/bin/bash
set -e
#
# note that zOS user and password exist in ~/.netrc
cat | ftp user@zOS <<EOF
ascii
get file.to.download
EOF
cat file.to.download |\
tee >(wc >wc.file.to.download)  \
     >(cut -b 28-37 | sort | head -n 1 >date.file.to.download) \
     >(egrep '^...USER ' >user.file.to.download) |\
bzip2 >file.to.download.bz2
bzcmp file.to.download && rm -v file.to.download
touch -d $(cat date.file.to.download) *file.to.download*
git add *file.to.download*
git commit -m "add file.to.download files $(cat date.file.to.download)"

Actually "file.to.download" is set up to be a different file each
week. It is a z/OS GDG which is generated weekly.

What I'd like to be able to do is eliminate the need to write out
"file.to.transfer" and just somehow pipe it into the "tee" command
directly. I just don't see a way to do it.

--
Maranatha! <><
John McKown

----------------------------------------------------------------------
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/

Reply via email to