Ben de Luca wrote:
 
> just for interest is there a way? of doing this so its entirely in
> /bin/sh? there by making it portable

They key to doing arithmetic in the shell is 'let', which operates
on environment variables sans dollar sign:

n=10
let i=1
while [ $i -lt $n ]; do
        echo $i
        let i=i+1
done


-- 
_________________________________
Rick Welykochy || Praxis Services

"A low voter turnout is an indication of fewer people going to the polls."
     -- Dan Quayle
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to