<?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: shell scripting in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478017#M212895</link>
    <description>your "cat list|while read" and "read nothing" are both reading from stdin and will read from the date from "cat list |"&lt;BR /&gt;&lt;BR /&gt;you'll need to do something like this&lt;BR /&gt;&lt;BR /&gt;cat list |&amp;amp;&lt;BR /&gt;&lt;BR /&gt;while read -p while read &lt;BR /&gt;do&lt;BR /&gt;  echo "current user is $usr"&lt;BR /&gt;  while true&lt;BR /&gt;  do&lt;BR /&gt;    echo "I am in while loop"&lt;BR /&gt;    echo "Press ny key"&lt;BR /&gt;    read nothing &lt;BR /&gt;  done&lt;BR /&gt;done</description>
    <pubDate>Thu, 03 Feb 2005 14:53:14 GMT</pubDate>
    <dc:creator>c_51</dc:creator>
    <dc:date>2005-02-03T14:53:14Z</dc:date>
    <item>
      <title>shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478016#M212894</link>
      <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;I want to achive a pause in my script.It doesnot take the pause and loop contniues to run.&lt;BR /&gt;&lt;BR /&gt;I have done it in similar way long back , but now it is not working .&lt;BR /&gt;&lt;BR /&gt;Is there any way to insert a pause in a loop ?&lt;BR /&gt;&lt;BR /&gt;Please reply ,&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;BL.&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;cat list |while read usr ;do&lt;BR /&gt;echo "current user is $usr"&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;        echo "I am in while loop"&lt;BR /&gt;        echo "Press ny key"&lt;BR /&gt;        read nothing &lt;BR /&gt;done&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Feb 2005 14:35:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478016#M212894</guid>
      <dc:creator>baiju_3</dc:creator>
      <dc:date>2005-02-03T14:35:20Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478017#M212895</link>
      <description>your "cat list|while read" and "read nothing" are both reading from stdin and will read from the date from "cat list |"&lt;BR /&gt;&lt;BR /&gt;you'll need to do something like this&lt;BR /&gt;&lt;BR /&gt;cat list |&amp;amp;&lt;BR /&gt;&lt;BR /&gt;while read -p while read &lt;BR /&gt;do&lt;BR /&gt;  echo "current user is $usr"&lt;BR /&gt;  while true&lt;BR /&gt;  do&lt;BR /&gt;    echo "I am in while loop"&lt;BR /&gt;    echo "Press ny key"&lt;BR /&gt;    read nothing &lt;BR /&gt;  done&lt;BR /&gt;done</description>
      <pubDate>Thu, 03 Feb 2005 14:53:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478017#M212895</guid>
      <dc:creator>c_51</dc:creator>
      <dc:date>2005-02-03T14:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478018#M212896</link>
      <description>sorry for my typo's&lt;BR /&gt;&lt;BR /&gt;should be&lt;BR /&gt;&lt;BR /&gt;read the data from "cat list |"&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt;while read -p usr&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Feb 2005 14:55:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478018#M212896</guid>
      <dc:creator>c_51</dc:creator>
      <dc:date>2005-02-03T14:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478019#M212897</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;I did change the loop begning like this and it started working,&lt;BR /&gt;&lt;BR /&gt;for usr in `cat list`&lt;BR /&gt;do&lt;BR /&gt;while :&lt;BR /&gt;do &lt;BR /&gt;......&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;BL.</description>
      <pubDate>Thu, 03 Feb 2005 15:00:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478019#M212897</guid>
      <dc:creator>baiju_3</dc:creator>
      <dc:date>2005-02-03T15:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478020#M212898</link>
      <description>&amp;gt; Is there any way to insert a pause in a loop ?&lt;BR /&gt;&lt;BR /&gt;What do you mean by pause? Do you mean that&lt;BR /&gt;the script should wait for any user key input and&lt;BR /&gt;once user presses any key, it should continue or&lt;BR /&gt;just pause for a short time (like 2 Sec)?&lt;BR /&gt;&lt;BR /&gt;If you want to wait for any use key stroke, then do&lt;BR /&gt;this:&lt;BR /&gt;---&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;echo "I am in while loop"&lt;BR /&gt;echo "Press any key"&lt;BR /&gt;read&lt;BR /&gt;done&lt;BR /&gt;----&lt;BR /&gt;&lt;BR /&gt;If you want to pause for short time (like 2 Sec), &lt;BR /&gt;then do this:&lt;BR /&gt;--&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;echo "I am in while loop"&lt;BR /&gt;echo "Press any key"&lt;BR /&gt;sleep 2&lt;BR /&gt;done&lt;BR /&gt;----&lt;BR /&gt;&lt;BR /&gt;Did I understand the question correctly?&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Feb 2005 15:00:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478020#M212898</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-02-03T15:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478021#M212899</link>
      <description>Never mind, I did misunderstand your question :-(&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Feb 2005 15:04:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478021#M212899</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-02-03T15:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478022#M212900</link>
      <description>Hi,&lt;BR /&gt;a simple approach:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;while read user&lt;BR /&gt;do&lt;BR /&gt;echo "current user is $user"&lt;BR /&gt;echo "Press any key:\c"&lt;BR /&gt;read nothing done &amp;lt;$1&lt;BR /&gt;&lt;BR /&gt;Run the above loop.sh with your input file as $1, e.g.:&lt;BR /&gt;# loop.sh infile&lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Thu, 03 Feb 2005 15:10:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478022#M212900</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2005-02-03T15:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: shell scripting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478023#M212901</link>
      <description>This is a little function that I have been using for years:&lt;BR /&gt;&lt;BR /&gt;pause()&lt;BR /&gt;{&lt;BR /&gt;read junk?'Press RETURN to continue.'&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;echo "Looping."&lt;BR /&gt;pause&lt;BR /&gt;echo "Here we go again..."&lt;BR /&gt;done</description>
      <pubDate>Fri, 04 Feb 2005 05:03:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shell-scripting/m-p/3478023#M212901</guid>
      <dc:creator>Gordon  Morrison</dc:creator>
      <dc:date>2005-02-04T05:03:01Z</dc:date>
    </item>
  </channel>
</rss>

