<?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: Script help me(about EOF) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542591#M678693</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; &amp;gt;Dennis: No, you must have here documents on following lines.&lt;BR /&gt;&lt;BR /&gt;where is following lilnes?&lt;BR /&gt;&lt;BR /&gt;What is meant is that the body (lines) of the "here-document" must be written on lines that are separate from the '&amp;lt;&amp;lt;[-]word' line.&lt;BR /&gt;&lt;BR /&gt;You could type these three lines:&lt;BR /&gt;&lt;BR /&gt;# cat &amp;lt;&amp;lt;'EOF'&lt;BR /&gt;&amp;gt; today is $(date)&lt;BR /&gt;&amp;gt; EOF&lt;BR /&gt;today is $(date)&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;...As you know, when you type "EOF" and hit the keyboard ENTER or RETURN key, the string "today is..." is returned.&lt;BR /&gt;&lt;BR /&gt;If you want command-substitution too, don't quote the here-document end-marker (the 'EOF') like this:&lt;BR /&gt;&lt;BR /&gt;# cat &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;&amp;gt; today is $(date)&lt;BR /&gt;&amp;gt; EOF&lt;BR /&gt;today is Wed Dec  2 14:29:08 EST 2009&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;...Now, if you want to edit the document without retyping, recall it (esc+K) in a Korn or Posix shell and use the 'vi' editor to change it:&lt;BR /&gt;&lt;BR /&gt;# cat &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;today is Wed Dec  2 14:29:38 EST 2009...a good day&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;The "^J" sequences represent newline sequences generated by pressing the return/enter key or by pressing the Control-key, a lowercase "v", and then a lowercase "j".&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 02 Dec 2009 19:37:11 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2009-12-02T19:37:11Z</dc:date>
    <item>
      <title>Script help me(about EOF)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542584#M678686</link>
      <description>Dear all&lt;BR /&gt;I have a question for script.&lt;BR /&gt;my shell is csh and os is hp-ux 11.23&lt;BR /&gt;i have a sript file as like:&lt;BR /&gt;#!/usr/bin/csh&lt;BR /&gt;CELLtalk -n YT5_MBX &amp;lt;&amp;lt; 'EOF'&lt;BR /&gt;du *&lt;BR /&gt;'EOF'&lt;BR /&gt;&lt;BR /&gt;how to run on to command-line?&lt;BR /&gt;For example)&lt;BR /&gt;$&amp;gt;CELLtalk -n YT5_MBX &amp;lt;&amp;lt; 'EOF' \n du * \n 'EOF'&lt;BR /&gt;right my syntex?&lt;BR /&gt;But i could not get any results.&lt;BR /&gt;&lt;BR /&gt;Please let me know... &lt;BR /&gt;have a good time.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Dec 2009 06:40:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542584#M678686</guid>
      <dc:creator>Kyuyong-Kwon</dc:creator>
      <dc:date>2009-12-02T06:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Script help me(about EOF)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542585#M678687</link>
      <description>&amp;gt;my shell is csh&lt;BR /&gt;&lt;BR /&gt;You should give up on the scummy C shell and switch to a real shell: ksh or sh&lt;BR /&gt;&lt;BR /&gt;CELLtalk -n YT5_MBX &amp;lt;&amp;lt; 'EOF'&lt;BR /&gt;du *&lt;BR /&gt;'EOF'&lt;BR /&gt;&lt;BR /&gt;This looks like a here document.  What are you intending to do with "du *"?  Those single quotes don't look correct, try:&lt;BR /&gt;CELLtalk -n YT5_MBX &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;du *&lt;BR /&gt;EOF</description>
      <pubDate>Wed, 02 Dec 2009 06:53:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542585#M678687</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-12-02T06:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Script help me(about EOF)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542586#M678688</link>
      <description>thank you for your fast reply.&lt;BR /&gt;Thats right. &lt;BR /&gt;I perceive that I have used single quotes.&lt;BR /&gt;Dose not run on to command line in Cshell?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Dec 2009 07:16:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542586#M678688</guid>
      <dc:creator>Kyuyong-Kwon</dc:creator>
      <dc:date>2009-12-02T07:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Script help me(about EOF)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542587#M678689</link>
      <description>Since you got the solution from Dennis perhaps you should assign him his points ;)&lt;BR /&gt;&lt;A href="http://forums13.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums13.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt;</description>
      <pubDate>Wed, 02 Dec 2009 08:55:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542587#M678689</guid>
      <dc:creator>Tor-Arne Nostdal</dc:creator>
      <dc:date>2009-12-02T08:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Script help me(about EOF)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542588#M678690</link>
      <description>&amp;gt;I perceive that I have used single quotes.&lt;BR /&gt;&lt;BR /&gt;Do you know why you used quotes?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Does not run on to command line in cshell?&lt;BR /&gt;&lt;BR /&gt;No, you must have here documents on following lines.</description>
      <pubDate>Wed, 02 Dec 2009 09:00:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542588#M678690</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-12-02T09:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Script help me(about EOF)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542589#M678691</link>
      <description>Dear Dennis&lt;BR /&gt;&amp;gt;Do you know why you used quotes?&lt;BR /&gt;i've found it on the website.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;No, you must have here documents on following lines.&lt;BR /&gt;&lt;BR /&gt;where is following lilnes?</description>
      <pubDate>Wed, 02 Dec 2009 09:21:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542589#M678691</guid>
      <dc:creator>Kyu-Yong Kwon</dc:creator>
      <dc:date>2009-12-02T09:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Script help me(about EOF)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542590#M678692</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;even in csh the command in your script is not different to that in interactive mode:&lt;BR /&gt;nik@hpx6[200] csh&lt;BR /&gt;hpx6% cat &amp;gt;/tmp/xx &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;a&lt;BR /&gt;b&lt;BR /&gt;EOF&lt;BR /&gt;hpx6% cat /tmp/xx&lt;BR /&gt;a&lt;BR /&gt;b&lt;BR /&gt;hpx6% &lt;BR /&gt;&lt;BR /&gt;The tcsh used a secondary prompt '?' as default:&lt;BR /&gt;cat &amp;gt;/tmp/xx &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;? a&lt;BR /&gt;? b&lt;BR /&gt;? EOF&lt;BR /&gt;&lt;BR /&gt;mfG Peter&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Dec 2009 11:44:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542590#M678692</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2009-12-02T11:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Script help me(about EOF)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542591#M678693</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; &amp;gt;Dennis: No, you must have here documents on following lines.&lt;BR /&gt;&lt;BR /&gt;where is following lilnes?&lt;BR /&gt;&lt;BR /&gt;What is meant is that the body (lines) of the "here-document" must be written on lines that are separate from the '&amp;lt;&amp;lt;[-]word' line.&lt;BR /&gt;&lt;BR /&gt;You could type these three lines:&lt;BR /&gt;&lt;BR /&gt;# cat &amp;lt;&amp;lt;'EOF'&lt;BR /&gt;&amp;gt; today is $(date)&lt;BR /&gt;&amp;gt; EOF&lt;BR /&gt;today is $(date)&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;...As you know, when you type "EOF" and hit the keyboard ENTER or RETURN key, the string "today is..." is returned.&lt;BR /&gt;&lt;BR /&gt;If you want command-substitution too, don't quote the here-document end-marker (the 'EOF') like this:&lt;BR /&gt;&lt;BR /&gt;# cat &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;&amp;gt; today is $(date)&lt;BR /&gt;&amp;gt; EOF&lt;BR /&gt;today is Wed Dec  2 14:29:08 EST 2009&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;...Now, if you want to edit the document without retyping, recall it (esc+K) in a Korn or Posix shell and use the 'vi' editor to change it:&lt;BR /&gt;&lt;BR /&gt;# cat &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;today is Wed Dec  2 14:29:38 EST 2009...a good day&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;The "^J" sequences represent newline sequences generated by pressing the return/enter key or by pressing the Control-key, a lowercase "v", and then a lowercase "j".&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Dec 2009 19:37:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542591#M678693</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-12-02T19:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Script help me(about EOF)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542592#M678694</link>
      <description>&amp;gt;I've found it on the website.&lt;BR /&gt;&lt;BR /&gt;It appears it works similarly to a real shell except you don't quote the "word" at the end of the document.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;JRF: If you want command-substitution too, don't quote the here-document end-marker&lt;BR /&gt;&lt;BR /&gt;It may be easier to use "\" to quote it.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Dec 2009 09:30:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542592#M678694</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-12-03T09:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Script help me(about EOF)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542593#M678695</link>
      <description>You can (atleast if you're using bash) do it like this:&lt;BR /&gt;command &amp;lt;&amp;lt;&amp;lt; "what the input should be"&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;CELLtalk -n YT5_MBX &amp;lt;&amp;lt;&amp;lt; "`du *`"&lt;BR /&gt;&lt;BR /&gt;I'm not sure if this will work in CSH thou.&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik Eriksson</description>
      <pubDate>Thu, 03 Dec 2009 09:51:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help-me-about-eof/m-p/4542593#M678695</guid>
      <dc:creator>Fredrik.eriksson</dc:creator>
      <dc:date>2009-12-03T09:51:24Z</dc:date>
    </item>
  </channel>
</rss>

