<?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: &amp;lt;&amp;lt;EOF is not matched ? in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011313#M99185</link>
    <description>You've probably noticed that the Forums removes extra spaces. You can indent the text in your 'here document' between the &amp;lt;&amp;lt; EOF and the actual EOF string. The important rule is that the termination string must start in column 1 (flush left). Anything before that string has no restrictions on spacing.</description>
    <pubDate>Mon, 30 Oct 2006 15:21:39 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2006-10-30T15:21:39Z</dc:date>
    <item>
      <title>&lt;&lt;EOF is not matched ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011307#M99179</link>
      <description>I have the following in my script, and get the error in the subject...why is this not working?&lt;BR /&gt;&lt;BR /&gt;mail -t $mailgroup &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;   Subject: $subjetc&lt;BR /&gt;   From: $name&lt;BR /&gt;   Cc: $dbgroup&lt;BR /&gt;   this is the text &lt;BR /&gt;EOF&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Oct 2006 14:19:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011307#M99179</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2006-10-30T14:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: &lt;&lt;EOF is not matched ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011308#M99180</link>
      <description>Try putting a space between &amp;lt;&amp;lt; and EOF.&lt;BR /&gt;&lt;BR /&gt;mail -t $mailgroup &amp;lt;&amp;lt; EOF&lt;BR /&gt;Subject: $subjetc&lt;BR /&gt;From: $name&lt;BR /&gt;Cc: $dbgroup&lt;BR /&gt;this is the text&lt;BR /&gt;EOF</description>
      <pubDate>Mon, 30 Oct 2006 14:28:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011308#M99180</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2006-10-30T14:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: &lt;&lt;EOF is not matched ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011309#M99181</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Make sure that you EOF is flush left --- i.e. without any leading whitespace.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 30 Oct 2006 14:31:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011309#M99181</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-10-30T14:31:43Z</dc:date>
    </item>
    <item>
      <title>Re: &lt;&lt;EOF is not matched ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011310#M99182</link>
      <description>I tried that....I have put it in a case statement so perhaps that is the problem:&lt;BR /&gt;&lt;BR /&gt;case "$name" in&lt;BR /&gt;      A)&lt;BR /&gt;           mail -t $mailb &amp;lt;&lt;EOF&gt;&lt;/EOF&gt;           Subject: $groupbsubj&lt;BR /&gt;           From: $name&lt;BR /&gt;           Cc: $dbagroup&lt;BR /&gt;           text&lt;BR /&gt;           EOF&lt;BR /&gt;        ;;&lt;BR /&gt;       B)&lt;BR /&gt;            etc etc etc&lt;BR /&gt;&lt;BR /&gt;The error I get is actually Syntax error at line 18 : `&amp;lt;&amp;lt;' is not matched</description>
      <pubDate>Mon, 30 Oct 2006 14:32:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011310#M99182</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2006-10-30T14:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: &lt;&lt;EOF is not matched ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011311#M99183</link>
      <description>I just tried it in a case statement and it works fine.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;THING=$1&lt;BR /&gt;&lt;BR /&gt;case $THING in&lt;BR /&gt;&lt;BR /&gt;A)&lt;BR /&gt;mail -t $mailgroup &amp;lt;&amp;lt; EOF&lt;BR /&gt;Subject: $subjetc&lt;BR /&gt;From: $name&lt;BR /&gt;Cc: $dbgroup&lt;BR /&gt;this is the text&lt;BR /&gt;EOF&lt;BR /&gt;echo "A"&lt;BR /&gt;;;&lt;BR /&gt;&lt;BR /&gt;B)&lt;BR /&gt;echo "B"&lt;BR /&gt;;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I invoked my script as './script.sh A' and it echoed A to the screen and I got the email.&lt;BR /&gt;&lt;BR /&gt;Make absolutely SURE that you do NOT have any spaces before the last EOF.  Putting '   EOF' after the mail text is the only way I've duplicated your problem.</description>
      <pubDate>Mon, 30 Oct 2006 14:45:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011311#M99183</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2006-10-30T14:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: &lt;&lt;EOF is not matched ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011312#M99184</link>
      <description>Yep, it all had to be flush left.  That fixed it.  Thanks!</description>
      <pubDate>Mon, 30 Oct 2006 15:09:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011312#M99184</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2006-10-30T15:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: &lt;&lt;EOF is not matched ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011313#M99185</link>
      <description>You've probably noticed that the Forums removes extra spaces. You can indent the text in your 'here document' between the &amp;lt;&amp;lt; EOF and the actual EOF string. The important rule is that the termination string must start in column 1 (flush left). Anything before that string has no restrictions on spacing.</description>
      <pubDate>Mon, 30 Oct 2006 15:21:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011313#M99185</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-10-30T15:21:39Z</dc:date>
    </item>
    <item>
      <title>Re: &lt;&lt;EOF is not matched ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011314#M99186</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Just FYI, bash has the &amp;lt;&amp;lt;- redirection operator, which strips leading tabs from the here-document.&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Mon, 30 Oct 2006 15:42:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011314#M99186</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2006-10-30T15:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: &lt;&lt;EOF is not matched ?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011315#M99187</link>
      <description>&amp;gt; You've probably noticed that the Forums&lt;BR /&gt;&amp;gt; removes extra spaces.  [...]&lt;BR /&gt;&lt;BR /&gt;Actually, it (they?) doesn't, but a&lt;BR /&gt;normal/typical Web browser does.  "View&lt;BR /&gt;document source" (or whatever your browser&lt;BR /&gt;calls it), and the indentation is more&lt;BR /&gt;obvious.  In this case, it all looked better&lt;BR /&gt;here than it must have in reality.  (That is,&lt;BR /&gt;no obvious space before the terminating&lt;BR /&gt;"EOF".)</description>
      <pubDate>Mon, 30 Oct 2006 23:26:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/lt-lt-eof-is-not-matched/m-p/5011315#M99187</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2006-10-30T23:26:21Z</dc:date>
    </item>
  </channel>
</rss>

