<?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 help_for script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217637#M679056</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I wrote one script to print the first 5 numbers&lt;BR /&gt;I want to modify this script in such a way that&lt;BR /&gt;it should display 1 and then replace 1 with 2 and so on.Its just like a stop watch.&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;#&lt;BR /&gt;echo "assigning value"&lt;BR /&gt;Value=1&lt;BR /&gt;while ((Value &amp;lt;= 5))&lt;BR /&gt;do&lt;BR /&gt;echo $Value&lt;BR /&gt;((Value=Value+1))&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance</description>
    <pubDate>Thu, 07 Jan 2010 12:23:48 GMT</pubDate>
    <dc:creator>Soul_1</dc:creator>
    <dc:date>2010-01-07T12:23:48Z</dc:date>
    <item>
      <title>help_for script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217637#M679056</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I wrote one script to print the first 5 numbers&lt;BR /&gt;I want to modify this script in such a way that&lt;BR /&gt;it should display 1 and then replace 1 with 2 and so on.Its just like a stop watch.&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;#&lt;BR /&gt;echo "assigning value"&lt;BR /&gt;Value=1&lt;BR /&gt;while ((Value &amp;lt;= 5))&lt;BR /&gt;do&lt;BR /&gt;echo $Value&lt;BR /&gt;((Value=Value+1))&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance</description>
      <pubDate>Thu, 07 Jan 2010 12:23:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217637#M679056</guid>
      <dc:creator>Soul_1</dc:creator>
      <dc:date>2010-01-07T12:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: help_for script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217638#M679057</link>
      <description>Hi Soul:&lt;BR /&gt;&lt;BR /&gt;# cat ./timer&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;echo "assigning value"&lt;BR /&gt;Value=1&lt;BR /&gt;while ((Value &amp;lt;= 5))&lt;BR /&gt;do&lt;BR /&gt;echo "${Value}\b\c"&lt;BR /&gt;sleep 1&lt;BR /&gt;((Value=Value+1))&lt;BR /&gt;done&lt;BR /&gt;echo&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 07 Jan 2010 12:56:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217638#M679057</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-01-07T12:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: help_for script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217639#M679058</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Its working fine...&lt;BR /&gt;&lt;BR /&gt;can u tell me what "\b\c" will do ?&lt;BR /&gt;&lt;BR /&gt;: )&lt;BR /&gt;&lt;BR /&gt;Thanks in advance</description>
      <pubDate>Fri, 08 Jan 2010 06:01:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217639#M679058</guid>
      <dc:creator>Soul_1</dc:creator>
      <dc:date>2010-01-08T06:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: help_for script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217640#M679059</link>
      <description>&lt;!--!*#--&gt;&amp;gt; can u tell me what "\b\c" will do ?&lt;BR /&gt;&lt;BR /&gt;      man echo</description>
      <pubDate>Fri, 08 Jan 2010 06:05:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217640#M679059</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-01-08T06:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: help_for script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217641#M679060</link>
      <description>Hi Soul,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; can u tell me what "\b\c" will do ?&lt;BR /&gt;\c instructs command not to perform a carriage return after the out-put.&lt;BR /&gt;\b is for backspace&lt;BR /&gt;&lt;BR /&gt;This is how the line will not change (\c) and the number will be over-written (\b).&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 08 Jan 2010 06:08:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217641#M679060</guid>
      <dc:creator>R.K. #</dc:creator>
      <dc:date>2010-01-08T06:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: help_for script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217642#M679061</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;When it comes to two digits ...its not displaying properly.when it reached two digits its displaying in one line.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.</description>
      <pubDate>Fri, 08 Jan 2010 06:20:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217642#M679061</guid>
      <dc:creator>Soul_1</dc:creator>
      <dc:date>2010-01-08T06:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: help_for script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217643#M679062</link>
      <description>&lt;!--!*#--&gt;&amp;gt; When it comes to two digits ...its not&lt;BR /&gt;&amp;gt; displaying properly. [...]&lt;BR /&gt;&lt;BR /&gt;Yes, one backspace character will not move&lt;BR /&gt;the cursor back two places.  You might try&lt;BR /&gt;using two backspace characters in that case.&lt;BR /&gt;&lt;BR /&gt;Have you ever used a typewriter?  The&lt;BR /&gt;concepts here are similar.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I wrote one script to print the first 5&lt;BR /&gt;&amp;gt; numbers&lt;BR /&gt;&lt;BR /&gt;If you describe the actual problem which you&lt;BR /&gt;are trying to solve, then you may get better&lt;BR /&gt;(more appropriate) answers.  Otherwise, if&lt;BR /&gt;you're the only one who knows what the actual&lt;BR /&gt;problem is, then you may need to do some&lt;BR /&gt;thinking for yourself.</description>
      <pubDate>Fri, 08 Jan 2010 07:03:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217643#M679062</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-01-08T07:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: help_for script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217644#M679063</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;Please help me to print first 25 numbers.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards</description>
      <pubDate>Fri, 08 Jan 2010 08:44:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217644#M679063</guid>
      <dc:creator>Soul_1</dc:creator>
      <dc:date>2010-01-08T08:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: help_for script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217645#M679064</link>
      <description>&amp;gt;When it comes to two digits&lt;BR /&gt;&lt;BR /&gt;If the digits are at the beginning, you can use "\r" for a carriage return.</description>
      <pubDate>Fri, 08 Jan 2010 09:17:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217645#M679064</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-01-08T09:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: help_for script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217646#M679065</link>
      <description>&lt;!--!*#--&gt;It is working after using \r&lt;BR /&gt;Little Interactive and edit as per Dennis:&lt;BR /&gt;&lt;BR /&gt;# cat timer&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;echo "Enter a number for counting: \c"        &lt;BR /&gt;read N&lt;BR /&gt;Value=1&lt;BR /&gt;while ((Value &amp;lt;= $N))&lt;BR /&gt;do&lt;BR /&gt;echo "${Value}\r\c"     # use "r" here&lt;BR /&gt;sleep 1&lt;BR /&gt;((Value=Value+1))&lt;BR /&gt;done&lt;BR /&gt;echo&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks JRF and Dennis...a good learing for me as well :-)</description>
      <pubDate>Fri, 08 Jan 2010 11:04:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217646#M679065</guid>
      <dc:creator>R.K. #</dc:creator>
      <dc:date>2010-01-08T11:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: help_for script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217647#M679066</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;As noted, the manpages (here, for 'echo') are you friend.  They contain a wealth of information.&lt;BR /&gt;&lt;BR /&gt;The use of the backspace (\b) is probably best seen in situations like this:&lt;BR /&gt;&lt;BR /&gt;# cat ./reply&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;typeset -l REPLY&lt;BR /&gt;echo "Is this correct [y|n]? y\b\c"&lt;BR /&gt;read REPLY&lt;BR /&gt;if [ "${REPLY}" = "n" ]; then&lt;BR /&gt;    echo "...then we won't do this..."&lt;BR /&gt;    exit 1&lt;BR /&gt;fi&lt;BR /&gt;echo "...proceeding..."&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;...Here, the cursor is positioned over the "y" with the expectation that the user can just hit the return/enter key to continue.  If that's not what is wanted, the user can simply over-type a "n".  The 'typeset -l' causes everything to be translated to lowercase letters so that one can freely use "n" or "N" or "Y" or "y".&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 08 Jan 2010 12:33:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217647#M679066</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-01-08T12:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: help_for script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217648#M679067</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thanks you all..&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Jan 2010 05:19:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217648#M679067</guid>
      <dc:creator>Soul_1</dc:creator>
      <dc:date>2010-01-14T05:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: help_for script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217649#M679068</link>
      <description>Done</description>
      <pubDate>Thu, 14 Jan 2010 05:20:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-for-script/m-p/5217649#M679068</guid>
      <dc:creator>Soul_1</dc:creator>
      <dc:date>2010-01-14T05:20:24Z</dc:date>
    </item>
  </channel>
</rss>

