<?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: Strange Issue With sed command in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670196#M243633</link>
    <description>The forum software mangles spaces and tab, converting any combination of then to a single space.&lt;BR /&gt;So if you need to show a tab in this forum, then you'll need to use a numeric representation like the octal 011 or dec 9 for HT, or a control char or the 'od' output with the text. Better still attach a text file with the exact charaters (do NOT cut &amp;amp; paste from screen as again this will mangle tabs)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The sed "1" command can show control characters in the pattern space.&lt;BR /&gt;Depending on the shell and such you can enter a true tab only by typing control-v followed by control-i sometimes shown as ^t.&lt;BR /&gt;Some versions of sed support \t for TAB or just use that \011&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Still... like JRF writes, the command line suggests you are trying to add a space or tab, not replace is. Please clarify. Do you want a tab/spaces added to the output, or removed from the input. In the latter case you'd have to swap the substitue components around (from /x/y/ to /y/x/ )&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
    <pubDate>Sat, 12 Nov 2005 16:18:04 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2005-11-12T16:18:04Z</dc:date>
    <item>
      <title>Strange Issue With sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670193#M243630</link>
      <description>Hi,&lt;BR /&gt;We are having a script which gets executed whenever we recieve a file in a particular mailbox and the script is suppose to move the file to another folder and before that It does following processing using sed&lt;BR /&gt;&lt;BR /&gt;sed -e "1,25s/^charset=/     charset=/g" /tmp/${FILENAME} &amp;gt;&lt;BR /&gt;/tmp/${FILENAME}.tmp&lt;BR /&gt;&lt;BR /&gt;What I understand from the above command is it is replacing the TAB space from the mail header.&lt;BR /&gt;&lt;BR /&gt;But What is happening is when it processes mail using sed and moves to the folder Intergration Server processes the first document but fails with other files and what we noticed in the header is the success one's and failed once are having different headers.&lt;BR /&gt;&lt;BR /&gt;Can anyone please help.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Amit.&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Nov 2005 21:26:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670193#M243630</guid>
      <dc:creator>Amit Dixit_2</dc:creator>
      <dc:date>2005-11-11T21:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Issue With sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670194#M243631</link>
      <description>Hi Amit:&lt;BR /&gt;&lt;BR /&gt;As written this code processes the first 25-lines (1-25) of /tmp${FILENAME}.  If, anchored (^) to the beginning of a line, string "charset=" appears, a space (blank) character is inserted before the string.  The output is, including any lines beyond #25 that do not receive substitution is written to /tmp/${FILENAME}.tmp.&lt;BR /&gt;&lt;BR /&gt;There is no TAB character apparent in your post.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sat, 12 Nov 2005 09:38:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670194#M243631</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-11-12T09:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Issue With sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670195#M243632</link>
      <description>Amit,&lt;BR /&gt;&lt;BR /&gt;JRF is correct, no TAB character in the substitution pattern. Could you clarify the following lines:&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; But What is happening is when it processes mail using sed and moves to the folder Intergration Server processes the first document but fails with other files and what we noticed in the header is the success one's and failed once are having different headers &amp;lt;&amp;lt;</description>
      <pubDate>Sat, 12 Nov 2005 15:07:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670195#M243632</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2005-11-12T15:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Issue With sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670196#M243633</link>
      <description>The forum software mangles spaces and tab, converting any combination of then to a single space.&lt;BR /&gt;So if you need to show a tab in this forum, then you'll need to use a numeric representation like the octal 011 or dec 9 for HT, or a control char or the 'od' output with the text. Better still attach a text file with the exact charaters (do NOT cut &amp;amp; paste from screen as again this will mangle tabs)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The sed "1" command can show control characters in the pattern space.&lt;BR /&gt;Depending on the shell and such you can enter a true tab only by typing control-v followed by control-i sometimes shown as ^t.&lt;BR /&gt;Some versions of sed support \t for TAB or just use that \011&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Still... like JRF writes, the command line suggests you are trying to add a space or tab, not replace is. Please clarify. Do you want a tab/spaces added to the output, or removed from the input. In the latter case you'd have to swap the substitue components around (from /x/y/ to /y/x/ )&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Sat, 12 Nov 2005 16:18:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670196#M243633</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2005-11-12T16:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Issue With sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670197#M243634</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;apart from tab problem, you say&lt;BR /&gt;&amp;gt;&amp;gt; Server processes the first document but fails with other files&lt;BR /&gt;&lt;BR /&gt;what is value of ${FILENAME} ?&lt;BR /&gt;&lt;BR /&gt;if you have 3 files &lt;BR /&gt;maila mailb mailc&lt;BR /&gt;and FILENAME="maila mailb mailc"&lt;BR /&gt;&lt;BR /&gt;the result of &lt;BR /&gt;sed -XXX ${FILENAME} &amp;gt; ${FILENAME}.tmp &lt;BR /&gt;is&lt;BR /&gt;sed -XXX maila mailb mailc &amp;gt; maila mailb mailc.tmp&lt;BR /&gt;&lt;BR /&gt;which might not be what you want.&lt;BR /&gt;what you want is more likely&lt;BR /&gt;FILENAME=$(any command that list files except .tmp files)&lt;BR /&gt;for f in ${FILENAME}&lt;BR /&gt;do&lt;BR /&gt; sed -XXX $f &amp;gt; $f.tmp&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Jean-Yves</description>
      <pubDate>Mon, 14 Nov 2005 07:10:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670197#M243634</guid>
      <dc:creator>Jean-Yves Picard</dc:creator>
      <dc:date>2005-11-14T07:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Issue With sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670198#M243635</link>
      <description>Hey Amit,&lt;BR /&gt;Are you from BSACET????&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Vipin</description>
      <pubDate>Mon, 14 Nov 2005 12:29:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670198#M243635</guid>
      <dc:creator>Vipin Singhal</dc:creator>
      <dc:date>2005-11-14T12:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Strange Issue With sed command</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670199#M243636</link>
      <description>Hey Vipin&lt;BR /&gt;shouldn't that be &lt;BR /&gt;ASBECT ?</description>
      <pubDate>Thu, 17 Nov 2005 07:07:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/strange-issue-with-sed-command/m-p/3670199#M243636</guid>
      <dc:creator>Frank de Vries</dc:creator>
      <dc:date>2005-11-17T07:07:43Z</dc:date>
    </item>
  </channel>
</rss>

