change
mput "go*"
bye
rm go*
End-of-session
exit 0
to
mput "go*"
bye
End-of-session
rm go*
exit 0
Because the rm go* is being fed to the ftp command (everything up to "End-of-session" is being fed to the ftp command), but the ftp session ended at "bye", and if it hadn't you would have removed the files on the remote machine (if anywhere). That's why you move that command down after the "End-of-session" line.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
I just noticed something, you use
ftp -n $Server <<End-of-Session
......
End-of-session
Those two tags don't match. That "End-of-(S/s)ession tag needs to be written exactly the same in both places.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
use rm -f if you want forced delete
something like rm -Rf / will just destroy everything :D
DimaYasny
Posting Virtuoso
1,777 posts since Jan 2007
Reputation Points: 183
Solved Threads: 89