- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: FTP question
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
Forums
Discussions
Discussions
Discussions
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
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
03-23-2005 06:51 AM
03-23-2005 06:51 AM
is it possible to get a specific range of files through FTP from a HP-UX script?
Ex:
CURDATE=`date '%m%d%y'`
ftp -i -n IP_ADDRESS > /baan4/plc_data/data/ftp.log << EOF
user login password
ascii
get *$CURDATE.csv
bye
EOF
All i want to do is fetch the files that got the current date in the name. (file_23032005.csv)
i have a scipt that is working but it's always getting the same file (*.csv). I want to be able to pass the file name as a parameter to it.
regards
PB
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2005 06:57 AM
03-23-2005 06:57 AM
Re: FTP question
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2005 07:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2005 07:08 AM
03-23-2005 07:08 AM
Re: FTP question
user login password
prom
ascii
mget *$CURDATE.csv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2005 07:11 AM
03-23-2005 07:11 AM
Re: FTP question
Your file example is file_23032005.csv (mmddyyyy) so:
CURDATE=`date +%d%m%Y`
And as mentioned above, get becomes mget:
mget *$CURDATE.csv
On SYS2 I created afile_23032005.csv, bfile_23032005.csv, and cfile_23032004.csv (notice the year on the last one).
The following grabbed the first two:
CURDATE=`date +%d%m%Y`
ftp -i -n 10.10.2.110 > /tmp/ftp.log << EOF
user user pass
ascii
mget /tmp/*$CURDATE.csv
bye
EOF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2005 07:27 AM
03-23-2005 07:27 AM
Re: FTP question
regards
PB