- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ftp script variable file list
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2000 02:56 PM
тАО10-26-2000 02:56 PM
FLIST=`ls 60*`
ftp
prompt off
mput $FLIST
bye
@EOF
Thanks
Rich
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2000 07:29 PM
тАО10-26-2000 07:29 PM
SolutionHowever, mput does understand file name meta-characters (called globbing). From the ftp man page:
When file name globbing is enabled, ftp expands csh(1) metacharacters in file an
d directory names. These characters are *, ?, [, ], ~, {, and }.
The server host expands remote file and directory names. Globbing metacharacters are always expanded for the ls and dir commands. If globbing is enabled, metacharacters are also expanded for the multiple-file commands mdelete, mdir, mget, mls, and mput.
So just put mget * in your script. Since the script will expand shell script masking characters, be sure to escape the * with a backslash.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2000 10:51 PM
тАО10-26-2000 10:51 PM
Re: ftp script variable file list
Firstly you should use ftp with -i option, so it will not ask you to copy a file if you use mget, mput options which are described by Bill. If you want to use mput you may put the files to be transferred to a directory and use that directory in your script like mput $DIR/*.
Another option is to create ftp sctipt by another script and run this newly created script.
Regards,
Erkan Durmus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-26-2000 10:53 PM
тАО10-26-2000 10:53 PM
Re: ftp script variable file list
Firstly you should use ftp with -i option, so it will not ask you to copy a file if you use mget, mput options which are described by Bill. If you want to use mput you may put the files to be transferred to a directory and use that directory in your script like mput $DIR/*.
Another option is to create ftp sctipt by another script and run this newly created script.
Regards,
Erkan Durmus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-27-2000 03:07 AM
тАО10-27-2000 03:07 AM
Re: ftp script variable file list
Firstly you should use ftp with -i option, so it will not ask you to copy a file if you use mget, mput options which are described by Bill. If you want to use mput you may put the files to be transferred to a directory and use that directory in your script like mput $DIR/*.
Another option is to create ftp sctipt by another script and run this newly created script.
Regards,
Erkan Durmus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-09-2006 03:52 PM
тАО11-09-2006 03:52 PM