Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site imsvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!gatech!seismo!elsie!imsvax!harris From: harris@imsvax.UUCP (Harris Reavin) Newsgroups: net.unix Subject: How to convert csh to sh? Message-ID: <476@imsvax.UUCP> Date: Thu, 12-Dec-85 15:40:03 EST Article-I.D.: imsvax.476 Posted: Thu Dec 12 15:40:03 1985 Date-Received: Mon, 16-Dec-85 04:13:42 EST Organization: IMS Inc, Rockville MD Lines: 31 (bug food) I have a csh script that does a mail merge that I want to convert to a Bourne shell script. Can anyone show me how to do it. My main problem is the "for" loop. I do not know how to give it numeric arguments. The input consists of 4 line addresses separated by a blank line. The headerfile has the date and some blank lines. The textfile has the body of the letter. ------------------------------------------------------------------------- # while ($status == 0) cat headerfile foreach i (0 1 2 3 4) set argv = ($<) if ($i == 0) then set line = ($argv:x) endif echo $argv end if ($#line != 3) then exit endif echo Dear $line[1] $line[3]':' cat textfile end ------------------------------------------------------------------------ Thanks for any help. -- Harris Reavin UUCP: {umcp-cs!eneevax || seismo!rlgvax!elsie}!imsvax!harris