Code:
get () {
ftplist="" # Set to null in case for second invocation
for item in $@ ; do
full_name=ftp://$server/$dir/$item
ftplist="$ftplist $full_name"
done
echo "About to get the following:"
echo $ftplist | tr ' ' '\n'
echo "Press Y to continue, any other to quit"
read answer
case $answer in
[Yy] ) ftp $ftplist
;;
* ) echo "Not doing ftp:"
echo $ftplist | tr ' ' '\n'
;;
esac
}
An slighty interactive version of the auto-fetch script. The changes are in blue