From owner-freebsd-questions Fri Oct 26 23:52:59 2001 Delivered-To: freebsd-questions@freebsd.org Received: from ns2.wananchi.com (mail.wananchi.com [62.8.64.4]) by hub.freebsd.org (Postfix) with ESMTP id 8270237B401 for ; Fri, 26 Oct 2001 23:52:52 -0700 (PDT) Received: from wash by ns2.wananchi.com with local (Exim 3.33 #1) id 15xNJY-000Mtm-00; Sat, 27 Oct 2001 09:51:28 +0300 Date: Sat, 27 Oct 2001 09:51:28 +0300 From: Odhiambo Washington To: FreeBSD user Cc: FBSD-Q Subject: Re: Newbie-Simple C Shell programming help Message-ID: <20011027095128.C80546@ns2.wananchi.com> Mail-Followup-To: Odhiambo Washington , FreeBSD user , FBSD-Q References: <20011026193434.45814.qmail@web9607.mail.yahoo.com> <20011026134417.O35370-100000@Amber.XtremeDev.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: <20011026134417.O35370-100000@Amber.XtremeDev.com> User-Agent: Mutt/1.3.23i X-Disclaimer: Any views expressed in this message,where not explicitly attributed otherwise, are mine alone!. X-Fortune: There is a Massachusetts law requiring all dogs to have their hind legs tied during the month of April. X-Operating-System: FreeBSD 4.4-STABLE i386 X-Best-Window-Manager: XFCE X-Mailer: Mutt http://www.mutt.org/ X-Designation: Systems Administrator, Wananchi Online Ltd. X-Location: Nairobi, KE, East Africa. X-Uptime: 9:50AM up 12 days, 4 mins, 1 user, load averages: 0.13, 0.13, 0.12 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * FreeBSD user [20011026 22:46]: writing on the sub= ject 'Re: Newbie-Simple C Shell programming help' | #!/bin/sh | N=3D1 | while [ $N -le 100 ] | do | echo $N | N=3D`expr $N+1` N=3D`expr $N + 1` The spaces before and after the (+) - that is one thing I read about quite recently while trying to get the picture about shell scripting.... | done |=20 | And /bin/sh is not a c shell. |=20 |=20 | On Fri, 26 Oct 2001, The Almonds wrote: |=20 | > All, | > | > I am trying to run a program via a c shell 100 times | > for a stress test. | > | > I have | > #!/bin/sh | > for 1 in 1 2 3 | > | > do | > | > x | > | > done | > | > as you can see this is painful if I want to do 100. | > Anyone know of a quick way to do this for 100 loops. | > | > Curtis | > | > __________________________________________________ | > Do You Yahoo!? | > Make a great connection at Yahoo! Personals. | > http://personals.yahoo.com | > | > To Unsubscribe: send mail to majordomo@FreeBSD.org | > with "unsubscribe freebsd-questions" in the body of the message | > | > | > |=20 |=20 | To Unsubscribe: send mail to majordomo@FreeBSD.org | with "unsubscribe freebsd-questions" in the body of the message -Wash S y s t e m s A d m i n i s t r a t o r -- ~\\_ =20 Odhiambo Washington \\\\ =20 Wananchi Online Ltd., `\\\\\ =20 1st Flr Loita Hse, Loita Street |\\\\\ =20 PO Box 10286,00100-NAIROBI,KE. \\\\\|__.--~~\ =20 Fax: 254 2 313985-9 _--~ / =20 Fax: 254 2 313922 /~ ////// _-~~~~' =20 E-mail: wash@wananchi.com ('-//////-// =20 URL : http://www.wananchi.com //////(((-) =20 GSM: 254 72 743 223 / 254 733 744 121 /////" =20 _///" =20 +++ Self Test for Paranoia: You know you have it when you can't think of anything that's your own fault. --wac7ysb48OaltWcw Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE72llwn7LIsuxjem8RAoO1AJoDYFgFX0qUasabLv8qjh9nst6GpACfXCo5 702vOtFDp3mD/KrIcrB0uro= =I6vW -----END PGP SIGNATURE----- --wac7ysb48OaltWcw-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message