Have an FTP server (Unix or Linux) with a folder that contains the following files (for example):
filename.1391911
filename.2391911
filename.xml
When I issue mget file* command to ftp or sftp, I can fetch all three files. What I need to do is to fetch only
filename.1* and filename.2* i dont want filename.xml
mget filename.1* and mget filename.2* does not work in ftp
I tried grep and | but these aren't recognized by the ftp or sftp commands' prompt. I also tried --exclude but the mget here doesn't even support any options.
How do I solve this problem? I cannot specify the exact filename as it's not known. It must be a wild card
mget filename.*
and remove the .xml file afterwards. As for thefilename.1*
stuff, sftp will use the same globbing capabilities as the shell you'd normally be using if you'd ssh'd in to. – Marc B