FTP get script wildcard
Hi guy's please can you help? I've written a ftp script that should log onto the ftp location and drag back any file that ends in a .dat extension, however I can't get the wildcard *.dat to work...
The script works fine if I put a full filename in however....I'm lost..
#!/bin/bash
remote=ftpadd
username=user
passwd=password
localdir=/local/dir/
remotedir=/remote/dir/
ftp -in <<EOF
open $remote
user $username $passwd
lcd $localdir
cd $remotedir
get *.dat
close
bye
EOF
|