2.8 Bourne shell question

Henry Spencer henry at utzoo.UUCP
Sun Sep 8 09:52:07 AEST 1985


> 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.  (I think it's documented, in fact;
look for something like "...except where specified no input output
redirection is permitted for [built-in] commands..." at the top of the
list of built-in commands.)  The more recent (SysV) shells have fixed this.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.unix mailing list