[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: display variable multiple times




> I'd like to have the value of $1 be an interger that will display $UP x
> number of times dependent upon the value of $1.
> 
> so 
> 
> 	back 2
> 
> would issue the command 
> 
> 	cd ../../


I don't think bash allows for/next loops, so you'll have to make another
variable = 0, and say "while [ $variable < $1 ]; do" and then increment
$variable by one each loop.

Naturally, you'll want to cancel the newline by using echo -n , or else
you'll have:

../
../

et cetera.



-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.