Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site redwood.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!qantel!hplabs!hpda!fortune!redwood!rpw3
From: rpw3@redwood.UUCP (Rob Warnock)
Newsgroups: net.unix
Subject: Re: 2.8 Bourne shell question
Message-ID: <213@redwood.UUCP>
Date: Thu, 12-Sep-85 16:47:30 EDT
Article-I.D.: redwood.213
Posted: Thu Sep 12 16:47:30 1985
Date-Received: Sun, 15-Sep-85 11:44:04 EDT
References: <1450@uwmacc.UUCP> <5939@utzoo.UUCP>
Organization: [Consultant], Foster City, CA
Lines: 24

+---------------
| > I tried this litle shell script on my 2.8BSD Bourne shell:
| > 	read word < foo
| > and it didn't do what I thought it would do...
| > Is it possible to read from files?  Is this just a 2.8 bug?
| It's a defect in old Bourne shells... recent (SysV) shells have fixed this.
| Henry Spencer @ U of Toronto Zoology {allegra,ihnp4,linus,decvax}!utzoo!henry
+---------------

Another "quick hack" I have seen for this is:

	word=`head foo`

If you don't have "head", you can write it easily enough, or use (*gag*):

	word=`(read junk; echo \$junk) < foo`


Rob Warnock
Systems Architecture Consultant

UUCP:	{ihnp4,ucbvax!dual}!fortune!redwood!rpw3
DDD:	(415)572-2607
USPS:	510 Trinidad Lane, Foster City, CA  94404