View Single Post
  #2   (View Single Post)  
Old 1st June 2008
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

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
Attached Files
File Type: sh get_snapshot.sh (907 Bytes, 104 views)
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote