<?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: Progress Bar using shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/progress-bar-using-shell-script/m-p/4690090#M658932</link>
    <description>&lt;!--!*#--&gt;Hi (again) Ankit:&lt;BR /&gt;&lt;BR /&gt;Here's an example:&lt;BR /&gt;&lt;BR /&gt;# cat ./monitor&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;function show_progress&lt;BR /&gt;{&lt;BR /&gt;    while true&lt;BR /&gt;    do&lt;BR /&gt;        echo ".\c";&lt;BR /&gt;        sleep 1&lt;BR /&gt;    done&lt;BR /&gt;}&lt;BR /&gt;function do_work&lt;BR /&gt;{&lt;BR /&gt;    echo "...doing work\c"&lt;BR /&gt;    sleep 15&lt;BR /&gt;    echo "done!"&lt;BR /&gt;}&lt;BR /&gt;show_progress &amp;amp;&lt;BR /&gt;TIMER=$!&lt;BR /&gt;do_work&lt;BR /&gt;kill ${TIMER}&lt;BR /&gt;sleep 1&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
    <pubDate>Wed, 22 Sep 2010 18:41:27 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2010-09-22T18:41:27Z</dc:date>
    <item>
      <title>Progress Bar using shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/progress-bar-using-shell-script/m-p/4690087#M658929</link>
      <description>Hello All,&lt;BR /&gt;&lt;BR /&gt;I have made a script to etact diskinformation using sympd list it usually takes 3-8 Mins depaing on disks &amp;amp; array size.&lt;BR /&gt;&lt;BR /&gt;I want my script should display some progress bar like in Windows.is it possible to implement.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Ankit</description>
      <pubDate>Wed, 22 Sep 2010 16:37:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/progress-bar-using-shell-script/m-p/4690087#M658929</guid>
      <dc:creator>ankitj1983</dc:creator>
      <dc:date>2010-09-22T16:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Progress Bar using shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/progress-bar-using-shell-script/m-p/4690088#M658930</link>
      <description>Hi Ankit:&lt;BR /&gt;&lt;BR /&gt;One way to create a progress bar (dots, a spinning widget, etc.) in a shell script, is to build a function that paints the bar with small sleep intervals between each point.  Launch this piece as a background task and capture its pid in a variable, like: TIMER=$!.  Start your real work and when that's done, kill the background process that you first started (with 'kill ${TIMER}').&lt;BR /&gt;&lt;BR /&gt;If you prefer, you can do your real work as a background process and let your progress bar or widget spin as a foreground task.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 22 Sep 2010 17:00:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/progress-bar-using-shell-script/m-p/4690088#M658930</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-09-22T17:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: Progress Bar using shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/progress-bar-using-shell-script/m-p/4690089#M658931</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;Below is  my script.&lt;BR /&gt;"EMC") echo "its OK"&lt;BR /&gt;         ssh $srv /usr/symcli/bin/sympd list&amp;gt;/tmp/lun&lt;BR /&gt;&lt;BR /&gt;     echo "This is EMC"&lt;BR /&gt;&lt;BR /&gt;     echo "So we are extracting LUN ID'S"&lt;BR /&gt;&lt;BR /&gt;     while read inputline&lt;BR /&gt;     do&lt;BR /&gt;            lun=`cat /tmp/lun|grep $inputline|tr -s  " "|cut -d " " -f2`&lt;BR /&gt;            echo $lun&amp;gt;&amp;gt;disk_lun&lt;BR /&gt;            echo $lun&lt;BR /&gt;&lt;BR /&gt;     done&lt;DISK_OR&gt;&lt;/DISK_OR&gt;     ssh eux290 -n /usr/symcli/bin/sympd list&amp;gt;/tmp/ankit &amp;gt;&amp;gt;&amp;gt;Time _insert_here&lt;BR /&gt;&lt;BR /&gt;Can you bit explain as am running the command using ssh on another server so  it will long to track the pid.&lt;BR /&gt;&lt;BR /&gt;can we do time run until we get the control from ssh command.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Ankit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Sep 2010 18:08:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/progress-bar-using-shell-script/m-p/4690089#M658931</guid>
      <dc:creator>ankitj1983</dc:creator>
      <dc:date>2010-09-22T18:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Progress Bar using shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/progress-bar-using-shell-script/m-p/4690090#M658932</link>
      <description>&lt;!--!*#--&gt;Hi (again) Ankit:&lt;BR /&gt;&lt;BR /&gt;Here's an example:&lt;BR /&gt;&lt;BR /&gt;# cat ./monitor&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;function show_progress&lt;BR /&gt;{&lt;BR /&gt;    while true&lt;BR /&gt;    do&lt;BR /&gt;        echo ".\c";&lt;BR /&gt;        sleep 1&lt;BR /&gt;    done&lt;BR /&gt;}&lt;BR /&gt;function do_work&lt;BR /&gt;{&lt;BR /&gt;    echo "...doing work\c"&lt;BR /&gt;    sleep 15&lt;BR /&gt;    echo "done!"&lt;BR /&gt;}&lt;BR /&gt;show_progress &amp;amp;&lt;BR /&gt;TIMER=$!&lt;BR /&gt;do_work&lt;BR /&gt;kill ${TIMER}&lt;BR /&gt;sleep 1&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Sep 2010 18:41:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/progress-bar-using-shell-script/m-p/4690090#M658932</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-09-22T18:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Progress Bar using shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/progress-bar-using-shell-script/m-p/4690091#M658933</link>
      <description>Hi James,&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;I understand your script.Can you tell me if run the below command this command executes around 10-15 Mins.&lt;BR /&gt;&lt;BR /&gt;ssh eux290 -n /usr/symcli/bin/sympd list&amp;gt;/tmp/ankit &lt;BR /&gt;&lt;BR /&gt;So on that time i want to display the time.&lt;BR /&gt;&lt;BR /&gt;so how woild i do that ?</description>
      <pubDate>Wed, 22 Sep 2010 22:22:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/progress-bar-using-shell-script/m-p/4690091#M658933</guid>
      <dc:creator>ankitj1983</dc:creator>
      <dc:date>2010-09-22T22:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Progress Bar using shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/progress-bar-using-shell-script/m-p/4690092#M658934</link>
      <description>Hi (again) Ankit:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I understand your script.Can you tell me if run the below command this command executes around 10-15 Mins.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; ssh eux290 -n /usr/symcli/bin/sympd list&amp;gt;/tmp/ankit&lt;BR /&gt;&lt;BR /&gt;&amp;gt; So on that time i want to display the time.&lt;BR /&gt;&lt;BR /&gt;If you want to report the elapsed number of seconds, you can do:&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;T0=${SECONDS}&lt;BR /&gt;ssh eux290 -n /usr/symcli/bin/sympd list&amp;gt;/tmp/ankit&lt;BR /&gt;echo "elapsed time = $((${SECONDS}-${T0})) seconds"&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Sep 2010 22:59:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/progress-bar-using-shell-script/m-p/4690092#M658934</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-09-22T22:59:18Z</dc:date>
    </item>
  </channel>
</rss>

