Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbfsb!cbnewsb.cb.att.com!pfinkel From: pfinkel@cbnewsb.cb.att.com (paul.d.finkel) Newsgroups: comp.unix.shell Subject: Re: for loops Keywords: sh: for i to $FILES Message-ID: <1991Apr9.185256.18650@cbfsb.att.com> Date: 9 Apr 91 18:52:56 GMT References: <3693@ux.acs.umn.edu> Sender: news@cbfsb.att.com Distribution: na Organization: AT&T Bell Laboratories Lines: 21 In article <3693@ux.acs.umn.edu> edh@ux.acs.umn.edu (Merlinus Ambrosius) writes: >In sh, I'd like to do something like a BASIC for loop. Say I have $FILES >set to some number, and I'd like to go through a loop $FILES times. Can >this be done in sh? > >Thanks! > --eric Sure! count=0 while $count -lt $files do : count=`expr $count + 1` done I think this will do it! -- Family motto: Semper ubi, sub ubi. mail: attmail!pfinkel "My name is Fink, whaddaya think, I press pants for nothing?" (Punch line to corny joke that my father always told!)