Unix Shell Scripting Copy from one unix server to another
Posted on 2011-03-02
I need a shell script which can copy the files from one unix server to another after a exp command is executed successfully and remove the file from the source server.
(exp is a utility in oracle which exports table as dump files, I am sure most of you guys know, but just in case)
for ex: (psuedo code)
exp USERID=usr/pwd TABLES= table_a:sub_part_2002_A FILE=/source/path/dump_area/sub_part_2002_A .dmp
copy "sub_part_2002_A .dmp" to the "/remote/path/dump_area"
After succesful copy it should delete the file from the source path (/source/path/dump_area/sub_part_2002_A .dmp)
Also one more thing to this is:
I have a file which has following content:
sub_part_2002_A in the exp command should be taken from this file. After this is done then it should goto the next line of the file and replace it with sub_part_2002_J .dmp in the exp command. You see where I am going?