- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- << UNMATCHED error with << FTPEOF VERY URGENT!!
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
09-27-2002 03:31 AM
09-27-2002 03:31 AM
I keep getting this error:
2) Check connection FTP server
xx.xxx.xx.xx is alive
./ftp.sh[51]: syntax error at line 55 : `<<' unmatched
What the f#ck is wrong with this?
I copied this from another script wich runs every night, so this should work fine. Why do I get the error?!?!!?!?!? Is it because of the gremlins in my computer?
ftp -nv $2 << FTPEOF # > /tmp/temp_log.$$
user $3 $4
cd $5 #Switch to directory
get $1 #Get file
Sander
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 03:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 03:44 AM
09-27-2002 03:44 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
You need to at the end
bye
EOF
No need for the language mate
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 03:46 AM
09-27-2002 03:46 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
ftp -inv << EOF
open
user
binary
cd /home/
get .profile
bye
EOF
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 03:48 AM
09-27-2002 03:48 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
Rgds, Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 03:49 AM
09-27-2002 03:49 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
thnx for the reply.
Sorry to say but i've got an EOF!
ftp -nv $2 << FTPEOF # > /tmp/temp_log.$$
user $3 $4
cd $5 #Switch to directory
get $1 #Get file
FTPEOF #End spool
So what else can be the problem?
Sander
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 04:00 AM
09-27-2002 04:00 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
bye
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 04:01 AM
09-27-2002 04:01 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
I've taken out 1 < before FTPEOF (line no 50 approx.)
In the result you see a line
3) Conection succesfull
I didn't get that when I had <
Here's the entire script:
#-------------
# CONSTANTS
#------------
FILE=$1
SERVER=$2
USERNAME=$3
PASSWORD=$4
FTP_DIR=$5
EMAILADRES=$6 #"sander.derix@office.xerox.com"
#-------------
# LOG
#-------------
LOG=/tmp/$1.log
MSG=/tmp/$1.msg
echo "File transfer $1 to QAD failed" > $MSG
#----------------------------------------------------
echo "1) Checking for an Existing Input File"
cd /tmp
echo "1) Checking for an Existing Input File"
cd /tmp
cp $FILE $FILE-01
echo "2) Check connection FTP server"
#----------------------------------------------------
/usr/sbin/ping ${SERVER} >$LOG
grep -i "alive" $LOG
i=$?
if [ "$i" = "0" ] ; then
echo "3) Conection succesfull"
ftp -inv $SERVER < FTPEOF
user $3 $4
cd $5 #Switch to directory
get $1 #Get file
>> FTPEOF #End spool
if test $? = 0 ; then
cat /tmp/temp_log.$$ >>$MSG
echo ====
echo "FTP of $1 completed successfully."
echo ====
"ftp.sh" 85 lines, 3254 characters
(opbdev1:cpiddvl) /u/appl/sderix/test-> ./ftp.sh
./ftp.sh: !/bin/ksh: not found
1) Checking for an Existing Input File
2) Check connection FTP server
xx.xxx.xx.xx is alive
3) Conection succesfull
./ftp.sh[54]: FTPEOF: cannot open
./ftp.sh[55]: user: cannot execute
./ftp.sh[56]: /dg03/ftp_get: not found
ERROR [
cat: cannot open /tmp/temp_log.5928
====
FTP of mf680sfr.dat completed successfully.
====
./ftp.sh[65]: /tmp/mf680sfr.dat.msg: cannot execute
mailnote sent to
The flags you gave are used only when sending mail.
Usage: mailx -eiIUdFntBNHvV~ -T FILE -u USER -h hops -r address
-s SUBJECT -f FILE users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 04:02 AM
09-27-2002 04:02 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
I do not think that it is allowed to have anything but that EOF string on the line - not even a comment.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 04:08 AM
09-27-2002 04:08 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
You shouldn't have taken out the "<", that's why you're getting the new errors.
Take out the ">> " before the FTPEOF, and make sure the FTPEOF line is on it's own, starting at column 1.
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 04:11 AM
09-27-2002 04:11 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
I'm afraid it does not make sense taking one > out, as the script now believes that FTPEOF is an input file. Try and insert it again and make sure
FTPEOF
appears alone on a line.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 04:12 AM
09-27-2002 04:12 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
When I use the line
ftp -inv $SERVER < FTPEOF I get an error about unmatched <<
When I use this:(it's what i've got now):
ftp -inv $SERVER < FTPEOF
$USERNAME $PASSWORD
cd FTP_DIR get $FILE
EOF
I get this error:
220 vensun29 FTP server (SunOS 5.6) ready.
221 Goodbye.
./ftp.sh[55]:
./ftp.sh[56]: /dg03/ftp_get: not found
Regards,
Sander
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 04:19 AM
09-27-2002 04:19 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
'here" documents must follow this structure:
cat << EOF #...comments OK; EOF will end; note "<<"
echo hello
date
echo bye
EOF
# Note the EOF must start in leftmost column!
# Note that nothing else is allowed on that line!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 04:20 AM
09-27-2002 04:20 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
I suspect you now have a file called FTPEOF in the directory where you are running the script, created from one of your tests. I would remove it before you do anything else.
Just try it with this:
ftp -nv $2 << FTPEOF # > /tmp/temp_log.$$
user $3 $4
cd $5
get $1
FTPEOF
don't put any trailing comments on any lines either.
Rgds, Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 04:22 AM
09-27-2002 04:22 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
i've taken you're advise into account. This is what I've got:
ftp -inv $SERVER
<
cd $FTP_DIR
get $FILE
FTPEOF
No lines have anything before it or behind it.
I still get the same error:
./ftp.sh[51]: syntax error at line 55 : `<<' unmatched
Except that the line no changed :-(
Sander
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 04:27 AM
09-27-2002 04:27 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
ftp -inv $SERVER <
cd $FTP_DIR
get $FILE
FTPEOF
you have to move 2nd line up to end of 1st line.
Jean-Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 04:28 AM
09-27-2002 04:28 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
As I suggested earlier you should go back to your original version of your script:
......<< FTPEOF
.....
.....
FTPEOF
and correct the shell of your script:
!/bin/ksh: not found
indicates a spelling error, correct it to
#!/bin/sh
that might help
You stated that you copied the script. If you did a cut an paste there is a chance that you have copied some garbage too. If you - when using the original version of your script - still get the unmatched error, then try and delete the line containing
FTPEOF
and type it in again, manually.
regards,
John K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2002 04:34 AM
09-27-2002 04:34 AM
Re: << UNMATCHED error with << FTPEOF VERY URGENT!!
I changed the !/bin/ksh to #!/bin/ksh
I put the << FTPEOF back
nothing: the same error
I deleted the FTPEOF and:
SUCCESS! IT WORKS!!!!!!
Thank you so very much!! I really need to get some books. I had to sent in the file at 15:45 (Dutch time) so I still have 7 minutes... :-)
Regards,
Sander