Gzip and FTP datafiles in one step
511922Jan 15 2009 — edited Jan 19 2009Gzip and FTP datafiles in one step
i have 10 datafiles in a single dir. which are between 2GB and 3GB and i want to transfer it to another host using FTP. I want to do the following:
1. gzip all the datafiles
2. FTP them to target server
i want to accomplish this via shell script. Also i want do it in single step so as to save time.. something like below example:
mknod pipe.dmp p
nohup gzip -cNf < pipe.dmp > exp_infdbt01.dmp.gz &
nohup exp userid=system/xxxxx file=pipe.dmp log=exp_infdbt01_$date.log owner=INFADMIN &
Here a pipe is used to gzip the dump file as it generates the dump file and output it to exp_infdbt01.dmp.gz simultaneously..
How can i do something similar to above to accomplish above task in shell script in for loop.. i tried but didn't worked. Any other way?
I have RHEL 4 edition....using BASH shell