Path: utzoo!attcan!uunet!lll-winken!ames!ncar!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.questions Subject: Re: How to make a script file? Keywords: Ultrix 2.0 Message-ID: <15659@mimsy.UUCP> Date: 27 Jan 89 04:56:32 GMT References: <5828@phoenix.Princeton.EDU> Distribution: na Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 24 In article <5828@phoenix.Princeton.EDU> amlovell@phoenix.Princeton.EDU (Anthony M Lovell) writes: >I want to write a shell script (or whatever) which will be used thusly: > >scriptname N ( N an integer) >for i := 1 to 56 do > cat glob.N bbi.N | Mail bbi > >It's pretty easy, I guess - important things to note are that the files >and address aliases bbi must have I always as 2 digits. >ie: bb09 Easy: for j in 0 1 2 3 4 5; do for i in 0 1 2 3 4 5 6 7 8 9; do if expr $j$i \> 56; then break; fi cat glob.$j$i bbi.$j$i | Mail bbi$j$i # I think you meant this done Incidentally, spawning 56 sendmails without waiting would be frowned upon on our machines. . . . (Hint: /usr/lib/sendmail -oi) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris