- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ftp scripting syntax error
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-20-2001 09:18 AM
03-20-2001 09:18 AM
ftp scripting syntax error
Thanks. Here is the code.
19 host="tamdev1"
20
21 clear
22 echo "Enter to file to transfer. \c "
23 read file
24 echo $file
25
26 echo "Enter directory path. \c"
27 read path
28 echo $path
29
30 echo "Enter user name. \c"
31 read user
32 echo $user
33
34 echo "Enter password. \c"
35 read pass
36 echo $pass
37
38
39 for i in $host
40 do
41 ftp -i -v -n <
43 user $user $pass
44 cd $path
45 put $file
46 bye
47 EOF
48 done
Here is the code running.
Enter to file to transfer. lltamqa1
lltamqa1
Enter directory path. /home/jspencer
/home/jspencer
Enter user name. root
root
Enter password. (I replaced the pw here for posting on the web)
**********
./dist.sh[39]: Syntax error at line 41 : `<<' is not matched.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2001 09:27 AM
03-20-2001 09:27 AM
Re: ftp scripting syntax error
ftp ........ <<
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2001 09:30 AM
03-20-2001 09:30 AM
Re: ftp scripting syntax error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2001 09:39 AM
03-20-2001 09:39 AM
Re: ftp scripting syntax error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2001 09:41 AM
03-20-2001 09:41 AM
Re: ftp scripting syntax error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2001 09:54 AM
03-20-2001 09:54 AM
Re: ftp scripting syntax error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2001 09:57 AM
03-20-2001 09:57 AM
Re: ftp scripting syntax error
You could try deleting the ftp line in the script (and the EOF), retyping it just to make sure there are no spurious CR's or strange Vi 'isms...
The only other suggestion is adding #!/sbin/sh to the top of your script or check to see what shell you are running.
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2001 10:18 AM
03-20-2001 10:18 AM
Re: ftp scripting syntax error
Thanks for all of the rapid responses. This is my first posting. I think I will be back to post again.
41 ftp -i -v -n <<-EOF
42 open $i
43 user $user $pass
44 cd $path
45 put $file
46 bye
47
48 EOF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2003 04:13 AM
06-08-2003 04:13 AM
Re: ftp scripting syntax error
Excellent!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2003 01:44 PM
06-08-2003 01:44 PM
Re: ftp scripting syntax error
For readability, I like to indent the here-document but left-justify the beginning line and also the terminating line. Adn as you've seen, the HP Forums display method automatically removes leading white space from all text and also reduces repeated white space within the posted text to a single space.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2003 01:50 PM
06-08-2003 01:50 PM
Re: ftp scripting syntax error
For readability, I like to indent the here-document but left-justify the beginning line and also the terminating line. And as you've seen, the HP Forums display automatically removes leading white space from all text and also redurces repeated white space within the posted text to a single space.
Bill Hassell, sysadmin