but when i run my script tar says that related file is not exist! i think it try to use a file that it is not copied yet.
tar command is in merg function and copy starts in another function named backup
tar -uf "df-"$filename".tgz export-"$filename".tgz"
they called in this order:
backup $1 // creating df-$filename.tgz and export-$filename.tgz
merg // adds export-$filename.tgz to df-$filename.tgz
after shell execution, i run tar -uf df-081109.tgz export-081109.tgz it works successfully. and i guess it is because of copy process completion!
please pay attention that tar and copy execute in separate functions.
i use KSH and Solaris.
thanks for all replies. :-*