<?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: Please help me acheive Streamlined Counting in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150284#M688730</link>
    <description>Hi again Patrick,&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh is the posix shell&lt;BR /&gt;The posix-shell enables use of typeset for variable definition, which may also work in ksh. However,  the basic idea in &lt;BR /&gt; typeset -Z2 i=01&lt;BR /&gt;is to define a two-field integer, where a one digit number is preceded by zero&lt;BR /&gt;&lt;BR /&gt; The other definition&lt;BR /&gt;typeset -i NUMBER=0&lt;BR /&gt;simply marks NUMBER as an integer, which I thought looked quite natural under the circumstances, but if it breaks something later in your script it is probably because of attempts of assigning other than pure integers to it.&lt;BR /&gt;&lt;BR /&gt;Could you please post an example of the content of sizes.$TYPE&lt;BR /&gt;And what goes wrong in the adder_func?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
    <pubDate>Tue, 26 Feb 2008 19:47:14 GMT</pubDate>
    <dc:creator>john korterman</dc:creator>
    <dc:date>2008-02-26T19:47:14Z</dc:date>
    <item>
      <title>Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150272#M688718</link>
      <description>&lt;!--!*#--&gt;OOk, so this is a small part of a script I wrote to build disk groups using VXVM.  The only problem is that I am limited to a count of 8 maximum.  If I want more, I will have to add more lines of "if" statements.  How can I accomplish the same thing, in a few lines, but not be limited in the max count?:&lt;BR /&gt;&lt;BR /&gt;if [ $NUMBER -eq 1 ]&lt;BR /&gt; then&lt;BR /&gt;  continue&lt;BR /&gt;# exit&lt;BR /&gt;fi&lt;BR /&gt;if [ $NUMBER -eq 2 ]&lt;BR /&gt; then&lt;BR /&gt;alphabet="02"&lt;BR /&gt;count=0&lt;BR /&gt;fi&lt;BR /&gt;if [ $NUMBER -eq 3 ]&lt;BR /&gt; then&lt;BR /&gt;alphabet="02 03"&lt;BR /&gt;count=0&lt;BR /&gt;fi&lt;BR /&gt;if [ $NUMBER -eq 4 ]&lt;BR /&gt; then&lt;BR /&gt;alphabet="02 03 04"&lt;BR /&gt;count=0&lt;BR /&gt;fi&lt;BR /&gt;if [ $NUMBER -eq 5 ]&lt;BR /&gt; then&lt;BR /&gt;alphabet="02 03 04 05"&lt;BR /&gt;count=0&lt;BR /&gt;fi&lt;BR /&gt;if [ $NUMBER -eq 6 ]&lt;BR /&gt; then&lt;BR /&gt;alphabet="02 03 04 05 06"&lt;BR /&gt;count=0&lt;BR /&gt;fi&lt;BR /&gt;if [ $NUMBER -eq 7 ]&lt;BR /&gt; then&lt;BR /&gt;alphabet="02 03 04 05 06 07"&lt;BR /&gt;count=0&lt;BR /&gt;fi&lt;BR /&gt;if [ $NUMBER -eq 8 ]&lt;BR /&gt; then&lt;BR /&gt;alphabet="02 03 04 05 06 07 08"&lt;BR /&gt;count=0&lt;BR /&gt;fi&lt;BR /&gt;for letter in $alphabet&lt;BR /&gt;&lt;BR /&gt;do&lt;BR /&gt;    count=`expr $count + 1`&lt;BR /&gt;    echo "$letter"&lt;BR /&gt;done &amp;gt; count.txt&lt;BR /&gt;&lt;BR /&gt;Here is the output of count.txt:&lt;BR /&gt;&lt;BR /&gt;02&lt;BR /&gt;03&lt;BR /&gt;04&lt;BR /&gt;05&lt;BR /&gt;06&lt;BR /&gt;07&lt;BR /&gt;08&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Feb 2008 21:37:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150272#M688718</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2008-02-25T21:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150273#M688719</link>
      <description>I forgot this part at the beginning:&lt;BR /&gt;&lt;BR /&gt;echo "There are $TOTAL2 $DISKTYPE disks of this size available."&lt;BR /&gt;echo&lt;BR /&gt;echo "How many do you want to use(8 disks max!)"&lt;BR /&gt;print -n "to create your diskgroup? :"&lt;BR /&gt;read NUMBER</description>
      <pubDate>Mon, 25 Feb 2008 21:42:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150273#M688719</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2008-02-25T21:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150274#M688720</link>
      <description>&lt;!--!*#--&gt;Hi Patrick:&lt;BR /&gt;&lt;BR /&gt;You could generate your output along these lines:&lt;BR /&gt;&lt;BR /&gt;# cat ./makecount&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;MIN=2&lt;BR /&gt;MAX=20&lt;BR /&gt;echo "Enter base value \c"&lt;BR /&gt;read i&lt;BR /&gt;while (( $i &amp;lt;= MAX ))&lt;BR /&gt;do&lt;BR /&gt;    printf "&amp;gt;&amp;gt;&amp;gt; %02d\n" $i&lt;BR /&gt;    let i=i+1&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 25 Feb 2008 21:59:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150274#M688720</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-02-25T21:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150275#M688721</link>
      <description>Ok, I shortened it to the following:&lt;BR /&gt;&lt;BR /&gt;MIN=$NUMBER&lt;BR /&gt;MAX=$NUMBER&lt;BR /&gt;while (( $NUMBER &amp;lt;= MAX ))&lt;BR /&gt;do&lt;BR /&gt;    printf "&amp;gt;&amp;gt;&amp;gt; %02d\n" $NUMBER&lt;BR /&gt;        let NUMBER=NUMBER+1&lt;BR /&gt;done &amp;gt; count.txt&lt;BR /&gt;&lt;BR /&gt;The output of count.txt is now:&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; 08&lt;BR /&gt;&lt;BR /&gt;Something is wrong....&lt;BR /&gt;&lt;BR /&gt;If the variable $NUMBER=8, then the output should be:&lt;BR /&gt;&lt;BR /&gt;02&lt;BR /&gt;03&lt;BR /&gt;04&lt;BR /&gt;05&lt;BR /&gt;06&lt;BR /&gt;07&lt;BR /&gt;08&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Feb 2008 23:30:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150275#M688721</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2008-02-25T23:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150276#M688722</link>
      <description>Hi (again) Patrick:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;echo "Enter minimum value \c"&lt;BR /&gt;read MIN&lt;BR /&gt;echo "Enter miximum value \c"&lt;BR /&gt;read MAX&lt;BR /&gt;while (( $MIN &amp;lt;= MAX ))&lt;BR /&gt;do&lt;BR /&gt;    printf "&amp;gt;&amp;gt;&amp;gt; %02d\n" $MIN&lt;BR /&gt;    let MIN=MIN+1&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 26 Feb 2008 00:11:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150276#M688722</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-02-26T00:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150277#M688723</link>
      <description>Thanks.&lt;BR /&gt;&lt;BR /&gt;I supposed I should tell the purpose of the output from count.txt.  It getting used later in the script so that that this happens:&lt;BR /&gt;&lt;BR /&gt;vxdg -g fakedg adddisk fakedg02=c10t0d7&lt;BR /&gt;&lt;BR /&gt;vxdg -g fakedg adddisk fakedg03=c10t1d0&lt;BR /&gt;&lt;BR /&gt;vxdg -g fakedg adddisk fakedg04=c10t1d1&lt;BR /&gt;&lt;BR /&gt;vxdg -g fakedg adddisk fakedg05=c10t1d2&lt;BR /&gt;&lt;BR /&gt;vxdg -g fakedg adddisk fakedg06=c10t1d3&lt;BR /&gt;&lt;BR /&gt;vxdg -g fakedg adddisk fakedg07=c10t1d4&lt;BR /&gt;&lt;BR /&gt;vxdg -g fakedg adddisk fakedg08=c10t1d5&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Does this change anything?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Feb 2008 00:30:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150277#M688723</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2008-02-26T00:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150278#M688724</link>
      <description>I tell the script how many disks I want to use to create my disk group, and it automatically adds them.  This is how the script is working.  I am just trying to find a more efficient way to do the count than my current method.</description>
      <pubDate>Tue, 26 Feb 2008 00:34:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150278#M688724</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2008-02-26T00:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150279#M688725</link>
      <description>Here is another method I received:&lt;BR /&gt;&lt;BR /&gt;case $NUMBER&lt;BR /&gt;   in&lt;BR /&gt;      1)  continue ;;&lt;BR /&gt;      2) alphabet="02"&lt;BR /&gt;          count=0 ;;&lt;BR /&gt;      3) alphabet="02 03"&lt;BR /&gt;          count=0 ;;&lt;BR /&gt;      4) alphabet="02 03 04"&lt;BR /&gt;          count=0 ;;&lt;BR /&gt;      5) alphabet="02 03 04 05"&lt;BR /&gt;          count=0 ;;&lt;BR /&gt;      6) alphabet="02 03 04 05 06"&lt;BR /&gt;          count=0 ;;&lt;BR /&gt;      7) alphabet="02 03 04 05 06 07"&lt;BR /&gt;          count=0 ;;&lt;BR /&gt;      8) alphabet="02 03 04 05 06 07 08"&lt;BR /&gt;          count=0 ;;&lt;BR /&gt;esac</description>
      <pubDate>Tue, 26 Feb 2008 07:17:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150279#M688725</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2008-02-26T07:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150280#M688726</link>
      <description>&lt;!--!*#--&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;perhaps this example may help:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;typeset -Z2 i=01&lt;BR /&gt;typeset -i NUMBER=0&lt;BR /&gt;NUMBER=9&lt;BR /&gt;OUT=./count.txt&lt;BR /&gt;&lt;BR /&gt;case $NUMBER in&lt;BR /&gt;1) continue;;&lt;BR /&gt;*) while [ $i -lt $NUMBER ]&lt;BR /&gt;   do&lt;BR /&gt;        i=$(($i + 1))&lt;BR /&gt;        echo $i&lt;BR /&gt;   done &amp;gt;&amp;gt;$OUT&lt;BR /&gt;   ;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Tue, 26 Feb 2008 11:06:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150280#M688726</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2008-02-26T11:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150281#M688727</link>
      <description>john korterman,&lt;BR /&gt;&lt;BR /&gt;I see that you are using /usr/bin/sh for the script.  Is this supposed to work in ksh?&lt;BR /&gt;&lt;BR /&gt;I incorperated this into my script, and it broke a couple of things.  I think the problem is that the $NUMBER variable was set earlier in my script, and this modifies it, things get thrown off.  What exactly is the typeset stuff for?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Feb 2008 17:07:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150281#M688727</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2008-02-26T17:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150282#M688728</link>
      <description>&lt;!--!*#--&gt;I forgot to mention, that it does the count beautifully, when I use it like so:&lt;BR /&gt;&lt;BR /&gt;typeset -Z2 i=01&lt;BR /&gt;typeset -i NUMBER=0&lt;BR /&gt;NUMBER=`cat number.txt`&lt;BR /&gt;OUT=count.txt&lt;BR /&gt;&lt;BR /&gt;case $NUMBER&lt;BR /&gt;   in&lt;BR /&gt;      1) continue ;;&lt;BR /&gt;      *) while [ $i -lt $NUMBER ]&lt;BR /&gt;         do&lt;BR /&gt;           i=$(($i + 1))&lt;BR /&gt;           echo $i&lt;BR /&gt;         done &amp;gt; $OUT&lt;BR /&gt;         ;;&lt;BR /&gt;esac&lt;BR /&gt;&lt;BR /&gt;Here is the output of count.txt when $NUMBER is 5:&lt;BR /&gt;02&lt;BR /&gt;03&lt;BR /&gt;04&lt;BR /&gt;05&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The problems I encounter is later in the script, where I have a function setup to do the following:&lt;BR /&gt;&lt;BR /&gt;## Create a function that adds the sizes of all your disks together, and subtracts 5104.&lt;BR /&gt;NUMBER=`cat number.txt`&lt;BR /&gt;function adder_func&lt;BR /&gt;         {&lt;BR /&gt;         TYPE=$1&lt;BR /&gt;         if [ -s sizes.$TYPE ]; then&lt;BR /&gt;            let sum=0&lt;BR /&gt;            for i in `cat sizes.$TYPE`&lt;BR /&gt;            do&lt;BR /&gt;             ((i=$i - 5104))&lt;BR /&gt;             ((new_sum=$i + $sum))&lt;BR /&gt;             sum=$new_sum&lt;BR /&gt;            done&lt;BR /&gt;            ((last_sum=$new_sum * $NUMBER))&lt;BR /&gt;            echo ${last_sum}&lt;BR /&gt;           else&lt;BR /&gt;            break&lt;BR /&gt;          fi&lt;BR /&gt;         }&lt;BR /&gt;&lt;BR /&gt;## Call the adder_func function and output to value.txt to get the max size for your lvol.&lt;BR /&gt;&lt;BR /&gt;adder_func size &amp;gt; value.txt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here is the output of sizes.size:&lt;BR /&gt;524288000&lt;BR /&gt;&lt;BR /&gt;Here is the output of value.txt&lt;BR /&gt;20&lt;BR /&gt;&lt;BR /&gt;Based on the function, the output of value.txt should be:&lt;BR /&gt;2621414480&lt;BR /&gt;&lt;BR /&gt;Just to make sure I ran the numbers:&lt;BR /&gt;&lt;BR /&gt;root@server:/root_home&amp;gt; bc -l&lt;BR /&gt;524288000-5104&lt;BR /&gt;524282896&lt;BR /&gt;524282896*5&lt;BR /&gt;2621414480&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Under the old way I was doing the count, it was working just fine.  Now the number is off, and I don't know why.  Please help!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Feb 2008 17:29:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150282#M688728</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2008-02-26T17:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150283#M688729</link>
      <description>Here is what my script accomplishes:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.unix.com/showthread.php?p=302170700&amp;amp;posted=1#post302170700" target="_blank"&gt;http://www.unix.com/showthread.php?p=302170700&amp;amp;posted=1#post302170700&lt;/A&gt;</description>
      <pubDate>Tue, 26 Feb 2008 17:56:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150283#M688729</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2008-02-26T17:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150284#M688730</link>
      <description>Hi again Patrick,&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh is the posix shell&lt;BR /&gt;The posix-shell enables use of typeset for variable definition, which may also work in ksh. However,  the basic idea in &lt;BR /&gt; typeset -Z2 i=01&lt;BR /&gt;is to define a two-field integer, where a one digit number is preceded by zero&lt;BR /&gt;&lt;BR /&gt; The other definition&lt;BR /&gt;typeset -i NUMBER=0&lt;BR /&gt;simply marks NUMBER as an integer, which I thought looked quite natural under the circumstances, but if it breaks something later in your script it is probably because of attempts of assigning other than pure integers to it.&lt;BR /&gt;&lt;BR /&gt;Could you please post an example of the content of sizes.$TYPE&lt;BR /&gt;And what goes wrong in the adder_func?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Feb 2008 19:47:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150284#M688730</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2008-02-26T19:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150285#M688731</link>
      <description>I posted an example of sizes.$TYPE above already:&lt;BR /&gt;&lt;BR /&gt;$TYPE=size when I run the function:&lt;BR /&gt;&lt;BR /&gt;adder_func size &amp;gt; value.txt&lt;BR /&gt;&lt;BR /&gt;So sizes.$TYPE becomes sizes.size.&lt;BR /&gt;&lt;BR /&gt;Here is the output of sizes.size:&lt;BR /&gt;524288000</description>
      <pubDate>Tue, 26 Feb 2008 20:49:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150285#M688731</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2008-02-26T20:49:24Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me achieve Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150286#M688732</link>
      <description>&lt;P&gt;&amp;gt;john: typeset -Z2 i=01&lt;BR /&gt;&amp;gt;is to define a two-field integer, where a one digit number is preceded by zero&lt;BR /&gt;&lt;BR /&gt;Be very careful about using this trick. This caused errors for set_parms for the years 08 and 09:&lt;BR /&gt;&lt;A href="http://h30499.www3.hp.com/t5/System-Administration/Change-the-System-Date-and-Time-in-11-31/m-p/4150450" target="_blank"&gt;http://h30499.www3.hp.com/t5/System-Administration/Change-the-System-Date-and-Time-in-11-31/m-p/4150450&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2011 14:07:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150286#M688732</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-09-06T14:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150287#M688733</link>
      <description>&lt;!--!*#--&gt;Here is what I ended up using to get my script working correctly:&lt;BR /&gt;-----------------------------------------------&lt;BR /&gt;## Increment the disk counter based on $NUMBER, and output to disks3.txt&lt;BR /&gt;&amp;gt; disks3.txt&lt;BR /&gt;CURRENT=0&lt;BR /&gt;while [ $CURRENT -le $NUMBER ]&lt;BR /&gt;   do&lt;BR /&gt;         if [ $CURRENT -gt 1 ]&lt;BR /&gt;            then&lt;BR /&gt;            lv_val=$(printf "%.2d" $CURRENT)&lt;BR /&gt;##Capture disk names, all except the first disk in the disk group&lt;BR /&gt;            echo ${DISKGROUP}$lv_val &amp;gt;&amp;gt; disks3.txt&lt;BR /&gt;         fi&lt;BR /&gt;         CURRENT=$(($CURRENT + 1))&lt;BR /&gt;done&lt;BR /&gt;---------------------------------------------</description>
      <pubDate>Wed, 27 Feb 2008 15:51:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150287#M688733</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2008-02-27T15:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me achieve Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150288#M688734</link>
      <description>&lt;P&gt;CURRENT=$(($CURRENT + 1))&lt;BR /&gt;&lt;BR /&gt;You can simplify this to:&lt;BR /&gt;(( CURRENT += 1 ))&lt;BR /&gt;&lt;BR /&gt;And if you want performance add at the top:&lt;BR /&gt;typeset -i CURRENT&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2011 14:07:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150288#M688734</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-09-06T14:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150289#M688735</link>
      <description>Sorry to bump an old thread, but how would I get the output in hexidecimal?  I'm trying to make a script for disaster recovery exercises, and I want to be able to run mknod to create my group files for volume groups in LVM in a single swoop.  Any fast help would be appreciated!!</description>
      <pubDate>Tue, 21 Oct 2008 18:27:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150289#M688735</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2008-10-21T18:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150290#M688736</link>
      <description>Hi Patrick:&lt;BR /&gt;&lt;BR /&gt;You can use 'printf' to convert to hexadecimal output.  For example:&lt;BR /&gt;&lt;BR /&gt;# printf "%0x\n" 15&lt;BR /&gt;f&lt;BR /&gt;# pritnf "%0X\n" 15&lt;BR /&gt;F&lt;BR /&gt;printf "%02x\n" 10&lt;BR /&gt;0a&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 21 Oct 2008 18:46:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150290#M688736</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-10-21T18:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me acheive Streamlined Counting</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150291#M688737</link>
      <description>Would I plug that in at the end?</description>
      <pubDate>Tue, 21 Oct 2008 18:48:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/please-help-me-acheive-streamlined-counting/m-p/4150291#M688737</guid>
      <dc:creator>Patrick Ware_1</dc:creator>
      <dc:date>2008-10-21T18:48:19Z</dc:date>
    </item>
  </channel>
</rss>

