<?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 question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949490#M796845</link>
    <description>This is,&lt;BR /&gt;&lt;BR /&gt;If - is appended to &amp;lt;&amp;lt;, all leading tabs&lt;BR /&gt;are stripped from word and from the document.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;what you are requiring.&lt;BR /&gt;&lt;BR /&gt;-Muthu</description>
    <pubDate>Mon, 02 Jan 2006 04:22:45 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2006-01-02T04:22:45Z</dc:date>
    <item>
      <title>ftp scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949483#M796838</link>
      <description>I was wondering if someone might answer a question.  I have written a number of ftp scripts similar to the following:&lt;BR /&gt;&lt;BR /&gt;ftp -n -v &amp;lt;&amp;lt; endl &amp;gt;&amp;gt; ach_ftp.log&lt;BR /&gt;#&lt;BR /&gt;# Open an ftp connection&lt;BR /&gt;# Pass in username and password&lt;BR /&gt;# Set the transfer mode binary).&lt;BR /&gt;# Put the file into the ftp location&lt;BR /&gt;# Quit the ftp connection.&lt;BR /&gt;# Close the log file.&lt;BR /&gt;#&lt;BR /&gt;open $NODE&lt;BR /&gt;user $USERID $PASSWD&lt;BR /&gt;binary&lt;BR /&gt;put $PGP_DAILY/ach.encrypted $FILE&lt;BR /&gt;quit&lt;BR /&gt;endl&lt;BR /&gt;&lt;BR /&gt;However if I indent the lines for readability in the script - the script will not work.  I was just wondering why the commands can't be indented in the script?&lt;BR /&gt;&lt;BR /&gt;Dennis&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Dec 2005 16:00:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949483#M796838</guid>
      <dc:creator>Dennis Flinn</dc:creator>
      <dc:date>2005-12-30T16:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949484#M796839</link>
      <description>The comments should come fisrt and then follow the ftp commands .&lt;BR /&gt;&lt;BR /&gt;Is that what you are looking for or detail how you are indenting .&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# Open an ftp connection&lt;BR /&gt;# Pass in username and password&lt;BR /&gt;# Set the transfer mode binary).&lt;BR /&gt;# Put the file into the ftp location&lt;BR /&gt;# Quit the ftp connection.&lt;BR /&gt;# Close the log file.&lt;BR /&gt;#&lt;BR /&gt;ftp -n -v &amp;lt;&amp;lt; endl &amp;gt;&amp;gt; ach_ftp.log&lt;BR /&gt;open $NODE&lt;BR /&gt;user $USERID $PASSWD&lt;BR /&gt;binary&lt;BR /&gt;put $PGP_DAILY/ach.encrypted $FILE&lt;BR /&gt;quit&lt;BR /&gt;endl&lt;BR /&gt;&lt;BR /&gt;thx,&lt;BR /&gt;bl.</description>
      <pubDate>Fri, 30 Dec 2005 16:16:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949484#M796839</guid>
      <dc:creator>baiju_3</dc:creator>
      <dc:date>2005-12-30T16:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949485#M796840</link>
      <description>Hi Dennis:&lt;BR /&gt;&lt;BR /&gt;The technique you are using is called a "here-document".  Input is read up until the word that follows the '&amp;lt;&amp;lt;'.  In this case you choose the word "endl" which cannot be indented.&lt;BR /&gt;&lt;BR /&gt;If a '-' is appended to the '&amp;lt;&amp;lt;', then all leading *tab* characters are stripped from word and from the document.  This *does* allow for indentation.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Dec 2005 16:25:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949485#M796840</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-12-30T16:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949486#M796841</link>
      <description>Hi Dennis,&lt;BR /&gt;&lt;BR /&gt;You can use file .netrc in homedir of the user, which run ftp. For ftp session on NODE the file must contain the following part:&lt;BR /&gt;machine NODE&lt;BR /&gt;login USER&lt;BR /&gt;password PASSWORD&lt;BR /&gt;macdef init&lt;BR /&gt;bin&lt;BR /&gt;cd incoming&lt;BR /&gt;lcd /tmp&lt;BR /&gt;put swlist.out&lt;BR /&gt;quit&lt;BR /&gt;&lt;BR /&gt;You can modify the file from a script and after that run ftp NODE&lt;BR /&gt;&lt;BR /&gt;HTH</description>
      <pubDate>Fri, 30 Dec 2005 16:36:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949486#M796841</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2005-12-30T16:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949487#M796842</link>
      <description>As James mentioned, you can use &amp;lt;&amp;lt;- as the flag for your end-of-input string and then you can use tabs (but NOT spaces). However, you can put spaces and/or tabs in front of the ftp commands and still use just the &amp;lt;&amp;lt; flag--just make sure that the end-of-input string (endl in your case) starts in column 1.  Since indenting is usually done for readability, you might use ALL CAPS for your endl string: ENDL</description>
      <pubDate>Fri, 30 Dec 2005 18:59:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949487#M796842</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2005-12-30T18:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949488#M796843</link>
      <description>Use like,&lt;BR /&gt;&lt;BR /&gt;ftp -ivn $NODE &amp;lt;&amp;lt;-EOF &amp;lt;&amp;lt; ach_ftp.log&lt;BR /&gt;use $USERID $PASSWD&lt;BR /&gt;binary&lt;BR /&gt;put $PGP_DAILY/ach.encrypted $FILE&lt;BR /&gt;bye&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;will suite to use intent requirement.&lt;BR /&gt;&lt;BR /&gt;-Muthu</description>
      <pubDate>Mon, 02 Jan 2006 01:59:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949488#M796843</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2006-01-02T01:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949489#M796844</link>
      <description>Hi Dennis,&lt;BR /&gt;you you want to indent you can use &amp;lt;&amp;lt;- and tabs.&lt;BR /&gt;From man ksh:&lt;BR /&gt;          &amp;lt;&amp;lt;[-]word      The shell input is read up to a line that matches&lt;BR /&gt;                         word, or to an end-of-file.  No parameter&lt;BR /&gt;                         substitution, command substitution, or file name&lt;BR /&gt;                         generation is performed on word.  The resulting&lt;BR /&gt;                         document, called a here-document, becomes the&lt;BR /&gt;                         standard input.  If any character of word is&lt;BR /&gt;                         quoted, no interpretation is placed upon the&lt;BR /&gt;                         characters of the document.  Otherwise, parameter&lt;BR /&gt;                         and command substitution occurs, \new-line is&lt;BR /&gt;                         ignored, and \ must be used to quote the&lt;BR /&gt;                         characters \, $, `, and the first character of&lt;BR /&gt;                         word.  If - is appended to &amp;lt;&amp;lt;, all leading tabs&lt;BR /&gt;                         are stripped from word and from the document.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Mon, 02 Jan 2006 04:17:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949489#M796844</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2006-01-02T04:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949490#M796845</link>
      <description>This is,&lt;BR /&gt;&lt;BR /&gt;If - is appended to &amp;lt;&amp;lt;, all leading tabs&lt;BR /&gt;are stripped from word and from the document.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;what you are requiring.&lt;BR /&gt;&lt;BR /&gt;-Muthu</description>
      <pubDate>Mon, 02 Jan 2006 04:22:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949490#M796845</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2006-01-02T04:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: ftp scripting question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949491#M796846</link>
      <description>Thanks for all the responses.  They were all helpful and informative.&lt;BR /&gt;&lt;BR /&gt;Dennis</description>
      <pubDate>Tue, 03 Jan 2006 13:32:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ftp-scripting-question/m-p/4949491#M796846</guid>
      <dc:creator>Dennis Flinn</dc:creator>
      <dc:date>2006-01-03T13:32:47Z</dc:date>
    </item>
  </channel>
</rss>

