Custom Search
www.rocket99.com : Technical Guides Sybase Oracle UNIX Javascript


Technical Guides
Sybase
Oracle
UNIX
Javascript




Of Interest

Business Intelligence and Analytics



Oracle Training





UNIX » Shell » »

Looping in a script, via a counter

     




Looping, with counter, works in sh, bash, and ksh.
Loops are done inclusive of start and end numbers .. so
if you pass 1 and 6 as parms .. it will loop 6 times.



Syntax is difficult to remember .. bookmark this page.







#!/bin/ksh

x_start=$1
x_end=$2



while test $x_start -le $x_end ; do



echo "Processing number: $x_start"

/export/home/tester/test_runner.ksh $x_start



x_start=`expr $x_start + 1`



done











UNIX : Related Topics


Sybase Web Site
Sybase iAnywhere Mobile Web Site
Oracle Enterprise Web Site



Get the latest Rocket99 news and tech tips via






Site Index About this Guide to Sybase, Oracle, and UNIX Contact Us Advertise on this site




Copyright © 2016 Stoltenbar Inc All Rights Reserved.