Just append the second file to the first.
If you don't have a fancy copy-and-paste mechanism that you can use, just do this:
Code:
cat "for ftp transfer" >> cpy_test
Adapt the script so that the names and directories match.
Add the "ftp -nv..." line to the script.
Also, there are a few odd things about your script:
Quote:
tar cfz "$YESTERDAY".gz "$YESTERDAY"
|
You name the archive with a .gz extension, not a tar.gz extension. The guy who comes after you may think it's just a gzipped text file if you just call it $YESTERDAY.gz, but if you call it $YESTERDAY.tar.gz, he will know it's a tar archive.
Also, you give $YESTERDAY as the directory tar has to archive. This only works if the working directory is either / or /root/Desktop/testA/myfiletest/ . Using an extra line with "cd / " in it never hurts, and it will make your script a bit more portable.
I have a hard time imagining that the scripts you posted can work together now.
Please follow my advice about editing the file names and directory names.
Remember, your archive is called $YESTERDAY.gz (if you use the script as you posted it) and it is located in /, not /root/