<?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: output | read B; echo $B  ( now it works now it doesn't ) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392794#M350482</link>
    <description>Thanks for the reply.  But still have the same problem although I tried to implement your changes:&lt;BR /&gt;&lt;BR /&gt;echo "set linesize 200 heading off echo off verify off feedback off pagesize 0&lt;BR /&gt;      select max(sequence#) from v\$log_history;&lt;BR /&gt;      quit&lt;BR /&gt;      "  | sqlplus -s / as sysdba | sed 's/^[ \t]*//;s/[ \t]*$//' | sed '/^$/d' | while read maxseq; do echo ${maxseq}; done&lt;BR /&gt;echo $maxseq&lt;BR /&gt;echo ${maxseq}&lt;BR /&gt;&lt;BR /&gt;last two lines output null.  The main command does output the current value of the query = "13134" but it is not getting "stored" into "maxseq" and I can't subsequently reference it.  Am I doing something incorrectly in the way I implemented your suggested code?</description>
    <pubDate>Wed, 01 Apr 2009 19:40:37 GMT</pubDate>
    <dc:creator>Gilbert Standen_1</dc:creator>
    <dc:date>2009-04-01T19:40:37Z</dc:date>
    <item>
      <title>output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392791#M350479</link>
      <description>Hi, I often use scripts of the following type, for example:&lt;BR /&gt;------&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;# Program Notes&lt;BR /&gt;echo "set linesize 200 heading off echo off verify off feedback off pagesize 0&lt;BR /&gt;      select max(sequence#) from v\$log_history;&lt;BR /&gt;      quit&lt;BR /&gt;      "  | sqlplus -s / as sysdba | sed 's/^[ \t]*//;s/[ \t]*$//' | sed '/^$/d' | read maxseq&lt;BR /&gt;echo $maxseq&lt;BR /&gt;------&lt;BR /&gt;My question is that i find that on some boxes the "read" command will read in the output from pipe into the variable "maxseq" but then when I put this on other boxes, it does not, in other words, sometimes "read" as used above does not work.  I don't really understand what is affecting whether or not this will work.&lt;BR /&gt;&lt;BR /&gt;Is there a more reliable alternative for reading the output of the sqlplus call into a variable that is reliably portable across different boxes?&lt;BR /&gt;&lt;BR /&gt;Thanks, Gil</description>
      <pubDate>Wed, 01 Apr 2009 19:20:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392791#M350479</guid>
      <dc:creator>Gilbert Standen_1</dc:creator>
      <dc:date>2009-04-01T19:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392792#M350480</link>
      <description>Hi Gil:&lt;BR /&gt;&lt;BR /&gt;WHere this works, you are probably running an HP-UX POSIX shell or a Korn (ksh) one.  Where this fails, you are probably running the Bash shell.&lt;BR /&gt;&lt;BR /&gt;With the HP-UX Posix or ksh shell, this works:&lt;BR /&gt;&lt;BR /&gt;# echo a b c | read X Y Z&lt;BR /&gt;# echo ${X}&lt;BR /&gt;a&lt;BR /&gt;&lt;BR /&gt;Under Bash, nothing is printed :-)&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 01 Apr 2009 19:26:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392792#M350480</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-04-01T19:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392793#M350481</link>
      <description>Hi (gain) Gil:&lt;BR /&gt;&lt;BR /&gt;...and I forgot to add, if it is in Bash environments that you have the problem, then this:&lt;BR /&gt;&lt;BR /&gt;# echo a b c | read X Y Z&lt;BR /&gt;&lt;BR /&gt;...can be rectified with this:&lt;BR /&gt;&lt;BR /&gt;# echo a b c|while read X Y Z;do echo ${X};done&lt;BR /&gt;a&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 01 Apr 2009 19:30:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392793#M350481</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-04-01T19:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392794#M350482</link>
      <description>Thanks for the reply.  But still have the same problem although I tried to implement your changes:&lt;BR /&gt;&lt;BR /&gt;echo "set linesize 200 heading off echo off verify off feedback off pagesize 0&lt;BR /&gt;      select max(sequence#) from v\$log_history;&lt;BR /&gt;      quit&lt;BR /&gt;      "  | sqlplus -s / as sysdba | sed 's/^[ \t]*//;s/[ \t]*$//' | sed '/^$/d' | while read maxseq; do echo ${maxseq}; done&lt;BR /&gt;echo $maxseq&lt;BR /&gt;echo ${maxseq}&lt;BR /&gt;&lt;BR /&gt;last two lines output null.  The main command does output the current value of the query = "13134" but it is not getting "stored" into "maxseq" and I can't subsequently reference it.  Am I doing something incorrectly in the way I implemented your suggested code?</description>
      <pubDate>Wed, 01 Apr 2009 19:40:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392794#M350482</guid>
      <dc:creator>Gilbert Standen_1</dc:creator>
      <dc:date>2009-04-01T19:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392795#M350483</link>
      <description>Have you got anything before the "sed"?&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Apr 2009 19:44:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392795#M350483</guid>
      <dc:creator>Tingli</dc:creator>
      <dc:date>2009-04-01T19:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392796#M350484</link>
      <description>yes, this:&lt;BR /&gt;&lt;BR /&gt;echo "set linesize 200 heading off echo off verify off feedback off pagesize 0&lt;BR /&gt;select max(sequence#) from v\$log_history;&lt;BR /&gt;quit&lt;BR /&gt;" | sqlplus -s / as sysdba | sed......</description>
      <pubDate>Wed, 01 Apr 2009 19:54:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392796#M350484</guid>
      <dc:creator>Gilbert Standen_1</dc:creator>
      <dc:date>2009-04-01T19:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392797#M350485</link>
      <description>I mean, just type in:&lt;BR /&gt;&lt;BR /&gt;echo "set linesize 200 heading off echo off verify off feedback off pagesize 0&lt;BR /&gt;select max(sequence#) from v\$log_history;&lt;BR /&gt;quit&lt;BR /&gt;" | sqlplus -s / as sysdba</description>
      <pubDate>Wed, 01 Apr 2009 19:59:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392797#M350485</guid>
      <dc:creator>Tingli</dc:creator>
      <dc:date>2009-04-01T19:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392798#M350486</link>
      <description>sorry cannot figure out what point you are making tingli.  I need to take the output of that command and read it into a variable.  That's the goal.  Usually I can do that by just "| read" but as pointed out not all shells support this so I am looking for alternative code to accomplish same.  I need to use the value stored to the variable later on in additional scripting.</description>
      <pubDate>Wed, 01 Apr 2009 20:03:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392798#M350486</guid>
      <dc:creator>Gilbert Standen_1</dc:creator>
      <dc:date>2009-04-01T20:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392799#M350487</link>
      <description>Just want to know whether sqlplus works.</description>
      <pubDate>Wed, 01 Apr 2009 20:06:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392799#M350487</guid>
      <dc:creator>Tingli</dc:creator>
      <dc:date>2009-04-01T20:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392800#M350488</link>
      <description>i see - yes it works.  everything including the 2 sed expressions works - it outputs the current sequence# in v$log_history. thanks tingli.  good thought.</description>
      <pubDate>Wed, 01 Apr 2009 20:12:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392800#M350488</guid>
      <dc:creator>Gilbert Standen_1</dc:creator>
      <dc:date>2009-04-01T20:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392801#M350489</link>
      <description>Maybe your line is too long while the stty columns set to 80 only.</description>
      <pubDate>Wed, 01 Apr 2009 20:34:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392801#M350489</guid>
      <dc:creator>Tingli</dc:creator>
      <dc:date>2009-04-01T20:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392802#M350490</link>
      <description>Hi Gil:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; last two lines output null.&lt;BR /&gt;&lt;BR /&gt;Then I would suspect that your 'sed' may have eliminated everything but whitespace.&lt;BR /&gt;&lt;BR /&gt;Notice that:&lt;BR /&gt;&lt;BR /&gt;# sed -e '/^$/d' &lt;BR /&gt;&lt;BR /&gt;...doesn't delete lines consisting of spaces.  You probably want:&lt;BR /&gt;&lt;BR /&gt;# sed -e '/^[ \t]*$/d'&lt;BR /&gt;&lt;BR /&gt;...where the '\t' is a TAB character and there is a blank (space) before that.&lt;BR /&gt;&lt;BR /&gt;Too, it is cheaper to do:&lt;BR /&gt;&lt;BR /&gt;# sed -e 'sed '...' -e sed -e '...'&lt;BR /&gt;&lt;BR /&gt;...than to run a pipe of sed-to-sed.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Apr 2009 20:44:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392802#M350490</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-04-01T20:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392803#M350491</link>
      <description>Jim thanks for responding and for the suggestions.  It's appreciated.&lt;BR /&gt;&lt;BR /&gt;However, nope that is not it.  I tried your alternate sed expression and still same problem with the new sed code for blank lines.   I put a wc -c on the end of the expression and got "6".  I put a wc -l on the end of the expression and got "1".  The expression outputs the correct numeric 5-digit value on each run, on one line only.&lt;BR /&gt;&lt;BR /&gt;I talked to another sysadmin and he said this is due to fact that this is linux running on the HP box and that the so-called "ksh" on linux is not a "true" ksh shell and so this is not working the same as it would on HP-UX.&lt;BR /&gt;&lt;BR /&gt;How to do?  So I still cannot take the output of the pipes and save it to a variable.  Any suggestions of alternate method to get the output of the expression stored into a variable that can be used later in the script?&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;gil</description>
      <pubDate>Thu, 02 Apr 2009 12:57:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392803#M350491</guid>
      <dc:creator>Gilbert Standen_1</dc:creator>
      <dc:date>2009-04-02T12:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392804#M350492</link>
      <description>Hi Gil:&lt;BR /&gt;&lt;BR /&gt;I should add that some variations of 'sed' do _not_ understand '\t'.  THus, instead of writing:&lt;BR /&gt;&lt;BR /&gt;# sed -e '/^[ \t]*$/d'&lt;BR /&gt;&lt;BR /&gt;...to delete blank lines, do:&lt;BR /&gt;&lt;BR /&gt;# sed -e '/^[  ]*$/d'&lt;BR /&gt;&lt;BR /&gt;...where the bracketed characters are a space and a TAB character as typed on your keyboard.  Since I despise trying to read this later, I use Perl:&lt;BR /&gt;&lt;BR /&gt;# ... | perl -pe 's/^\s*$//'&lt;BR /&gt;&lt;BR /&gt;...which says substitute any _whitespace_ present (spaces, tabs, newlines) with nothing if the whitespace occupies the whole line.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Apr 2009 13:07:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392804#M350492</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-04-02T13:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392805#M350493</link>
      <description>I still think you must be using bash on the Linux box, not ksh, as this sounds like exactly the issue on bash with pipelines being run in subshells... when I've tried to kae code more portable, I've found functions can help... try this:&lt;BR /&gt;&lt;BR /&gt;function GetMaxSeq&lt;BR /&gt;{&lt;BR /&gt;echo "set linesize 200 heading off echo off verify off feedback off pagesize 0&lt;BR /&gt;select max(sequence#) from v\$log_history;&lt;BR /&gt;quit&lt;BR /&gt;" | sqlplus -s "/ as sysdba" | sed 's/^[ \t]*//;s/[ \t]*$//' | sed '/^$/d'&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;maxseq=$(GetMaxSeq)&lt;BR /&gt;&lt;BR /&gt;echo ${maxseq}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;&lt;BR /&gt;Duncan</description>
      <pubDate>Thu, 02 Apr 2009 13:11:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392805#M350493</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2009-04-02T13:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392806#M350494</link>
      <description>Hi Jim,&lt;BR /&gt;Look it's not the sed  or perl issue.  If I run this:&lt;BR /&gt;&lt;BR /&gt;echo "A" | read B&lt;BR /&gt;echo $B&lt;BR /&gt;&lt;BR /&gt;the "echo $B" is unset null blank.&lt;BR /&gt;&lt;BR /&gt;it's an issue with piping to "read" on linux - not a sed / perl issue.   I guess "read" cannot be used in this way on the flavor of ksh that linux supports. &lt;BR /&gt;&lt;BR /&gt;so what I am needing is some sort of alternate way to send output of a command, or a bunch of piped commands, etc. to a variable.&lt;BR /&gt;&lt;BR /&gt;Is there some way other than "read" to do that? &lt;BR /&gt;&lt;BR /&gt;Thanks for your help, Gil</description>
      <pubDate>Thu, 02 Apr 2009 13:16:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392806#M350494</guid>
      <dc:creator>Gilbert Standen_1</dc:creator>
      <dc:date>2009-04-02T13:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392807#M350495</link>
      <description>Duncan - works great!  Problem solved!  Jim thanks for all the good pointers on sed &amp;amp; perl. Man this forum is gold.  My personal quote for my forum profile:  "If I could take one thing with me into the next world it would be my valid login to HP ITRC Forums."  As true today as it was in 2004.  God I love this place!  I'm just a lowly Oracle DBA and frankly I'm lost...</description>
      <pubDate>Thu, 02 Apr 2009 13:21:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392807#M350495</guid>
      <dc:creator>Gilbert Standen_1</dc:creator>
      <dc:date>2009-04-02T13:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392808#M350496</link>
      <description>Hi Gil:&lt;BR /&gt;&lt;BR /&gt;This is what I said originally and what Duncan has reinfourced:&lt;BR /&gt;&lt;BR /&gt;# echo "A" | while read B; do echo ${B};done&lt;BR /&gt;A&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 02 Apr 2009 13:24:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392808#M350496</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-04-02T13:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392809#M350497</link>
      <description>On my server:&lt;BR /&gt;&lt;BR /&gt; &amp;gt; echo "A" |while read B; do echo ${B};done&lt;BR /&gt;A&lt;BR /&gt; &amp;gt; echo $B&lt;BR /&gt; &amp;gt;&lt;BR /&gt;&lt;BR /&gt;Duncan's:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; function gimme&lt;BR /&gt;&amp;gt; {&lt;BR /&gt;&amp;gt; echo "A"&lt;BR /&gt;&amp;gt; }&lt;BR /&gt;&amp;gt; maxseq=$(gimme)&lt;BR /&gt;&amp;gt; echo ${maxseq}&lt;BR /&gt;A&lt;BR /&gt;&lt;BR /&gt;Not same. :-)</description>
      <pubDate>Thu, 02 Apr 2009 13:34:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392809#M350497</guid>
      <dc:creator>Gilbert Standen_1</dc:creator>
      <dc:date>2009-04-02T13:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: output | read B; echo $B  ( now it works now it doesn't )</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392810#M350498</link>
      <description>Actually, I should have written:&lt;BR /&gt;&lt;BR /&gt;On my server:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; echo "A" |while read B; do echo ${B};done&lt;BR /&gt;A&lt;BR /&gt;&amp;gt; echo $B&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Duncan's:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; function gimme&lt;BR /&gt;&amp;gt; {&lt;BR /&gt;&amp;gt; echo "A"&lt;BR /&gt;&amp;gt; }&lt;BR /&gt;&amp;gt; B=$(gimme)&lt;BR /&gt;&amp;gt; echo ${B}&lt;BR /&gt;A&lt;BR /&gt;&lt;BR /&gt;Not same. :-) What I need and have now is a way to get the piped output stored in a variable.  Thanks All.  Mission accomplished.</description>
      <pubDate>Thu, 02 Apr 2009 13:36:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/output-read-b-echo-b-now-it-works-now-it-doesn-t/m-p/4392810#M350498</guid>
      <dc:creator>Gilbert Standen_1</dc:creator>
      <dc:date>2009-04-02T13:36:31Z</dc:date>
    </item>
  </channel>
</rss>

