<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ftp scripting syntax error in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507332#M924005</link>
    <description>I think you need a space between the &amp;lt;&amp;lt; and the EOF.&lt;BR /&gt;&lt;BR /&gt;ftp ........ &amp;lt;&amp;lt; &lt;MAKE sure="" space="" here=""&gt; EOF&lt;/MAKE&gt;</description>
    <pubDate>Tue, 20 Mar 2001 17:27:15 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2001-03-20T17:27:15Z</dc:date>
    <item>
      <title>ftp scripting syntax error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507331#M924004</link>
      <description>I have read the postings on ftp scripts here.   Any suggestions for how to resolve the error shown below?&lt;BR /&gt;Thanks.  Here is the code.&lt;BR /&gt;&lt;BR /&gt;    19  host="tamdev1"&lt;BR /&gt;    20&lt;BR /&gt;    21  clear&lt;BR /&gt;    22  echo "Enter to file to transfer. \c "&lt;BR /&gt;    23  read file&lt;BR /&gt;    24  echo $file&lt;BR /&gt;    25&lt;BR /&gt;    26  echo "Enter directory path. \c"&lt;BR /&gt;    27  read path&lt;BR /&gt;    28  echo $path&lt;BR /&gt;    29&lt;BR /&gt;    30  echo "Enter user name. \c"&lt;BR /&gt;    31  read user&lt;BR /&gt;    32  echo $user&lt;BR /&gt;    33&lt;BR /&gt;    34  echo "Enter password. \c"&lt;BR /&gt;    35  read pass&lt;BR /&gt;    36  echo $pass&lt;BR /&gt;    37&lt;BR /&gt;    38&lt;BR /&gt;    39  for i in $host&lt;BR /&gt;    40  do&lt;BR /&gt;    41    ftp -i -v -n &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;    42    open $i&lt;BR /&gt;    43    user $user $pass&lt;BR /&gt;    44    cd $path&lt;BR /&gt;    45    put $file&lt;BR /&gt;    46    bye&lt;BR /&gt;    47    EOF&lt;BR /&gt;    48  done&lt;BR /&gt;&lt;BR /&gt;Here is the code running.&lt;BR /&gt;&lt;BR /&gt;Enter to file to transfer. lltamqa1&lt;BR /&gt;lltamqa1&lt;BR /&gt;Enter directory path. /home/jspencer&lt;BR /&gt;/home/jspencer&lt;BR /&gt;Enter user name. root&lt;BR /&gt;root&lt;BR /&gt;Enter password. (I replaced the pw here for posting on the web)&lt;BR /&gt;**********&lt;BR /&gt;./dist.sh[39]: Syntax error at line 41 : `&amp;lt;&amp;lt;' is not matched.&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Mar 2001 17:18:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507331#M924004</guid>
      <dc:creator>Jim Spencer</dc:creator>
      <dc:date>2001-03-20T17:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting syntax error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507332#M924005</link>
      <description>I think you need a space between the &amp;lt;&amp;lt; and the EOF.&lt;BR /&gt;&lt;BR /&gt;ftp ........ &amp;lt;&amp;lt; &lt;MAKE sure="" space="" here=""&gt; EOF&lt;/MAKE&gt;</description>
      <pubDate>Tue, 20 Mar 2001 17:27:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507332#M924005</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2001-03-20T17:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting syntax error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507333#M924006</link>
      <description>I included a space.  Unfortunately it returned the same results, exactly.</description>
      <pubDate>Tue, 20 Mar 2001 17:30:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507333#M924006</guid>
      <dc:creator>Jim Spencer</dc:creator>
      <dc:date>2001-03-20T17:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting syntax error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507334#M924007</link>
      <description>I tried it on my machine too, evidently ftp does not like EOF.  I tried using the default bang ! and it worked.</description>
      <pubDate>Tue, 20 Mar 2001 17:39:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507334#M924007</guid>
      <dc:creator>Tracey</dc:creator>
      <dc:date>2001-03-20T17:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting syntax error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507335#M924008</link>
      <description>I think that is correct, it doesn't like EOF.  I used ENDFTP and it worked as well.</description>
      <pubDate>Tue, 20 Mar 2001 17:41:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507335#M924008</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2001-03-20T17:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting syntax error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507336#M924009</link>
      <description>I think it has something to do with your loop.  Have you tried taking the ftp out of the loop.  I have used EOF and ftp many times in the past.</description>
      <pubDate>Tue, 20 Mar 2001 17:54:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507336#M924009</guid>
      <dc:creator>Joseph C. Denman</dc:creator>
      <dc:date>2001-03-20T17:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting syntax error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507337#M924010</link>
      <description>Your script looks okay to me, I've just tried it on one of our servers with no problem.&lt;BR /&gt;&lt;BR /&gt;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...&lt;BR /&gt;The only other suggestion is adding #!/sbin/sh to the top of your script or check to see what shell you are running.&lt;BR /&gt;&lt;BR /&gt;Hope this helps!</description>
      <pubDate>Tue, 20 Mar 2001 17:57:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507337#M924010</guid>
      <dc:creator>Charles Harris</dc:creator>
      <dc:date>2001-03-20T17:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting syntax error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507338#M924011</link>
      <description>The answer to the problem has been revealed.  Although it does not show in the pasting of the script to the web site, the ftp commands were indented.  Removing the white space at the beginning of lines 42-46 resulted in the script succeeding.&lt;BR /&gt;&lt;BR /&gt;Thanks for all of the rapid responses.  This is my first posting.  I think I will be back to post again.&lt;BR /&gt;&lt;BR /&gt; 41  ftp -i -v -n &amp;lt;&amp;lt;-EOF&lt;BR /&gt;    42  open $i&lt;BR /&gt;    43  user $user $pass&lt;BR /&gt;    44  cd $path&lt;BR /&gt;    45  put $file&lt;BR /&gt;    46  bye&lt;BR /&gt;    47  &lt;BR /&gt;    48  EOF&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Mar 2001 18:18:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507338#M924011</guid>
      <dc:creator>Jim Spencer</dc:creator>
      <dc:date>2001-03-20T18:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting syntax error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507339#M924012</link>
      <description>Great, the answer to the problem revealed at the bottom also helped me.  I was experiencing the exact same problem and tried to find an answer everywhere, nowhere it mentioned that the indentations in the ftp portion of the script could represent a problem.&lt;BR /&gt;&lt;BR /&gt;Excellent!</description>
      <pubDate>Sun, 08 Jun 2003 11:13:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507339#M924012</guid>
      <dc:creator>MAD_2</dc:creator>
      <dc:date>2003-06-08T11:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting syntax error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507340#M924013</link>
      <description>The indentation problem is a very common for here-documents. The terminating string must be left-justified for &amp;lt;&amp;lt; but may be indented by using the &amp;lt;&amp;lt;- construct. The man pages for sh-posix and ksh both say leading tabs (look for here-document) but it does not mean white space (spaces or tabs).  This means that &lt;SPACE&gt;&lt;SPACE&gt;EOF will not work as a terminator, but &lt;TAB&gt;EOF will work OK.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;/TAB&gt;&lt;/SPACE&gt;&lt;/SPACE&gt;</description>
      <pubDate>Sun, 08 Jun 2003 20:44:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507340#M924013</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-06-08T20:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting syntax error</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507341#M924014</link>
      <description>The indentation problem is a very common for here-documents. The terminating string must be left-justified for &amp;lt;&amp;lt; but may be indented by using the &amp;lt;&amp;lt;- construct. The man pages for sh-posix and ksh both say leading tabs (look for here-document) but it does not mean white space. So &lt;SPACE&gt;EOF won't work at all (even with &amp;lt;&amp;lt;-) but &lt;TAB&gt;EOF will.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;/TAB&gt;&lt;/SPACE&gt;</description>
      <pubDate>Sun, 08 Jun 2003 20:50:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-syntax-error/m-p/2507341#M924014</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2003-06-08T20:50:58Z</dc:date>
    </item>
  </channel>
</rss>

