Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site CS-Arthur Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!inuxc!pur-ee!CS-Mordred!CS-Arthur!avr From: avr@CS-Arthur (Andrew V Royappa) Newsgroups: net.unix Subject: Re: Bourne shell programming question... Message-ID: <694@CS-Arthur> Date: Tue, 15-May-84 05:34:55 EDT Article-I.D.: CS-Arthu.694 Posted: Tue May 15 05:34:55 1984 Date-Received: Thu, 17-May-84 03:06:22 EDT References: <250@rna.UUCP> Organization: Department of Computer Science, Purdue University Lines: 23 x <-- 'x' to read a line off a file: ----- a=`head -1 $file` ----- If $file is null, stdin will be read. For shared code, you could do ----- CODE="lines of code separated by ; " eval $CODE # use code ----- If you do complicated things with quotes, you'll probably have to backslash a lot (backslash ? backstab ?). Another way to do this is to put all commands in a file (in /tmp/code.$$ or such), do eval `cat `, and remove the file later. Andrew Royappa {ucbvax,decvax,ihnp4,pur-ee}!purdue!avr yep, I should use 'r', but something weird happened when I did.