<?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. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836224#M938792</link>
    <description>You didn't really mean to try to read from a file at the same time that you were writing to it, did you? Consider the case where the file does not exist or is null, the read fails or is false and you never enter your loop. You really need to rethink your approach.&lt;BR /&gt;</description>
    <pubDate>Wed, 30 Oct 2002 17:32:02 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2002-10-30T17:32:02Z</dc:date>
    <item>
      <title>script help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836220#M938788</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;In the foll. while loop i am not able to create the /tmp/session file while it is doing so as a seperate command. Please help.&lt;BR /&gt;&lt;BR /&gt;while read sdcole&lt;BR /&gt;do&lt;BR /&gt;/var/mct/cmd user sdcole |grep -v USERNAME|cut -f3 -d "|" sort |uniq &amp;gt;&amp;gt; /tmp/session_list&lt;BR /&gt;done &amp;lt; /tmp/session_list&lt;BR /&gt;&lt;BR /&gt;The above command works fine without the while loop. Iam doing something wrong.Please help.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Ben.</description>
      <pubDate>Wed, 30 Oct 2002 17:09:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836220#M938788</guid>
      <dc:creator>ben_43</dc:creator>
      <dc:date>2002-10-30T17:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: script help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836221#M938789</link>
      <description>can you provide the details on what you are trying to accomplish with this script?  what is leading to the while loop?  &lt;BR /&gt;&lt;BR /&gt;Ted</description>
      <pubDate>Wed, 30 Oct 2002 17:22:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836221#M938789</guid>
      <dc:creator>Ted Ellis_2</dc:creator>
      <dc:date>2002-10-30T17:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: script help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836222#M938790</link>
      <description>Hi Ben:&lt;BR /&gt;&lt;BR /&gt;You are attempting to read the same file to which you write.  That isn't going to work.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 30 Oct 2002 17:24:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836222#M938790</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-10-30T17:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: script help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836223#M938791</link>
      <description>Hi Ben,&lt;BR /&gt;&lt;BR /&gt;You are using /tmp/session_list as standard output and standard input at the same time, hence why it won't work. You will need to redirect your output to another file.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;James.</description>
      <pubDate>Wed, 30 Oct 2002 17:24:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836223#M938791</guid>
      <dc:creator>James Murtagh</dc:creator>
      <dc:date>2002-10-30T17:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: script help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836224#M938792</link>
      <description>You didn't really mean to try to read from a file at the same time that you were writing to it, did you? Consider the case where the file does not exist or is null, the read fails or is false and you never enter your loop. You really need to rethink your approach.&lt;BR /&gt;</description>
      <pubDate>Wed, 30 Oct 2002 17:32:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836224#M938792</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2002-10-30T17:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: script help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836225#M938793</link>
      <description>why not output to file.1 then mv file.1 to file.2 and read file.2</description>
      <pubDate>Wed, 30 Oct 2002 17:45:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836225#M938793</guid>
      <dc:creator>John Meissner</dc:creator>
      <dc:date>2002-10-30T17:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: script help.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836226#M938794</link>
      <description>if you are trying to update your file... try and copy the contents of /tmp/session_list to something like /tmp/session_list_orig and use that to feed the while loop... then you will end up with an updated(appended to) /tmp/session_list&lt;BR /&gt;&lt;BR /&gt;Ted</description>
      <pubDate>Wed, 30 Oct 2002 17:47:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/script-help/m-p/2836226#M938794</guid>
      <dc:creator>Ted Ellis_2</dc:creator>
      <dc:date>2002-10-30T17:47:17Z</dc:date>
    </item>
  </channel>
</rss>

