Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!hsdndev!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.shell Subject: Re: for loops Message-ID: <27850:Apr700:08:2591@kramden.acf.nyu.edu> Date: 7 Apr 91 00:08:25 GMT References: <3693@ux.acs.umn.edu> <1991Apr3.213023.23397@athena.mit.edu> Organization: IR Lines: 23 In article rich@pencil.cs.missouri.edu (Rich Winkel) writes: > for i in `head -$FILES /usr/dict/words` > echo -n "*" > done for i in `yes | head -$FILES` echo -n "*" done But for this I'd probably just write yes '*' | head -$FILES | tr -d ' ' And let's not forget the poor man's count script: #!/bin/sh ( echo $1 ; yes | head -$2 | sed 's/y/p1+/' ) | dc $1 is the starting number, $2 how many numbers to produce. It even works for floating-point---try count 3.14159 10. ---Dan