<?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: simple script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027459#M760992</link>
    <description>&lt;BR /&gt;perl -le 'print for (shift..shift)' 5 9&lt;BR /&gt;&lt;BR /&gt;-l : print a linefeed after each print&lt;BR /&gt;-e : command text coming&lt;BR /&gt;print : prints default variable $_&lt;BR /&gt;for (x..y) : load default variable $_ with values from x through y in a loop&lt;BR /&gt;shift : grab next command line argument&lt;BR /&gt;&lt;BR /&gt;Enjoy,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 08 Feb 2007 20:33:02 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2007-02-08T20:33:02Z</dc:date>
    <item>
      <title>simple script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027457#M760990</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;I want to create such a script script.sh that for every two different numbers X and Y when X&amp;gt;Y it can do&lt;BR /&gt;X&lt;BR /&gt;X+1&lt;BR /&gt;X+2&lt;BR /&gt;...&lt;BR /&gt;Y&lt;BR /&gt;&lt;BR /&gt;up to X=Y&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;./script 5 9&lt;BR /&gt;it should returns &lt;BR /&gt;5&lt;BR /&gt;6&lt;BR /&gt;7&lt;BR /&gt;8&lt;BR /&gt;9&lt;BR /&gt;&lt;BR /&gt;That should happen for every 2 different numbers.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Andy&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Feb 2007 18:15:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027457#M760990</guid>
      <dc:creator>Inter_1</dc:creator>
      <dc:date>2007-02-08T18:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: simple script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027458#M760991</link>
      <description>Hi Andy:&lt;BR /&gt;&lt;BR /&gt;# awk 'END {for (i=X; i&amp;lt;=Y; i++) {print i}}' X=5 Y=9 /dev/null&lt;BR /&gt;&lt;BR /&gt;...specify any value of 'X' and 'Y' you want.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 08 Feb 2007 18:27:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027458#M760991</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-02-08T18:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: simple script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027459#M760992</link>
      <description>&lt;BR /&gt;perl -le 'print for (shift..shift)' 5 9&lt;BR /&gt;&lt;BR /&gt;-l : print a linefeed after each print&lt;BR /&gt;-e : command text coming&lt;BR /&gt;print : prints default variable $_&lt;BR /&gt;for (x..y) : load default variable $_ with values from x through y in a loop&lt;BR /&gt;shift : grab next command line argument&lt;BR /&gt;&lt;BR /&gt;Enjoy,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Feb 2007 20:33:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027459#M760992</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-02-08T20:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: simple script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027460#M760993</link>
      <description>and if you want a pure shell solution:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;if [[ ${#} -lt 2 ]]&lt;BR /&gt;  then&lt;BR /&gt;    echo "Usage: ${0} lo hi" &amp;gt;&amp;amp;2&lt;BR /&gt;    exit 255&lt;BR /&gt;  fi&lt;BR /&gt;typeset -i LO=${1}&lt;BR /&gt;typeset -i HI=${2}&lt;BR /&gt;shift 2&lt;BR /&gt;while [[ ${LO} -le ${HI} ]]&lt;BR /&gt;  do&lt;BR /&gt;     echo "${LO}"&lt;BR /&gt;     ((LO += 1))&lt;BR /&gt;  done&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Feb 2007 22:26:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027460#M760993</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-02-08T22:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: simple script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027461#M760994</link>
      <description>Yet another shell script solution:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;echo $* | awk '{for(i=$1;i&amp;lt;=$NF;++i) print i}'&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Feb 2007 00:25:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027461#M760994</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-02-09T00:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: simple script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027462#M760995</link>
      <description>Hi Andy,&lt;BR /&gt;use the function range:&lt;BR /&gt;function range&lt;BR /&gt;{&lt;BR /&gt;#######################################################&lt;BR /&gt;# Shows  all numbers from start_range to end_range&lt;BR /&gt;[[ $# -lt 1 || $# -gt 2 ]] &amp;amp;&amp;amp; echo "Usage: range start_range and_range" &amp;amp;&amp;amp; return&lt;BR /&gt;lo=$1&lt;BR /&gt;hi=$2&lt;BR /&gt;while [ $lo -le $hi ]&lt;BR /&gt;do &lt;BR /&gt;      echo "$lo \c"&lt;BR /&gt;      lo=$(expr $lo + 1)&lt;BR /&gt;done&lt;BR /&gt;echo&lt;BR /&gt;unset lo hi&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;range 1 5 9&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Mon, 12 Feb 2007 04:51:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027462#M760995</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2007-02-12T04:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: simple script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027463#M760996</link>
      <description>Thanks guys</description>
      <pubDate>Fri, 23 Feb 2007 12:17:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-script/m-p/5027463#M760996</guid>
      <dc:creator>Inter_1</dc:creator>
      <dc:date>2007-02-23T12:17:50Z</dc:date>
    </item>
  </channel>
</rss>

