From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: fee84,409f62bcdec6264f X-Google-Attributes: gidfee84,public From: Bob Vickers Subject: Re: Shell scripting under OSF1 Date: 1998/02/09 Message-ID: <34DEEB09.41C6@dcs.rhbnc.ac.uk>#1/1 X-Deja-AN: 323392605 Content-Transfer-Encoding: quoted-printable References: <886783241.6919.0.nnrp-03.c246a7b2@news.demon.co.uk> To: Eric Le =?iso-8859-1?Q?Donn=E9?= Content-Type: text/plain; charset=iso-8859-1 Organization: Royal Holloway College, University of London Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 Eric Le Donn=E9 wrote: > = > I was told, and I would like confirmation, that a Bourne script such as= the > following: > = > #!/bin/sh > = > ls | while read a > do > .... > .... > done > = > would fail because 'read ' in a pipe doesn't work on Dec Alpha... > = > Is it true ? False ? Does it depend on the version of the OS ? > = You may be thinking of something slightly different. The command echo fred | read a ; echo $a returns a null string under sh and bash, but returns 'fred' under ksh [I'm using DU 4.0B]. This is because most Bourne shells run all pipes as subprocesses. = Bob -- = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Bob Vickers R.Vickers@dcs.rhbnc.ac.uk Dept of Computer Science, Royal Holloway College, University of London WWW: http://www.cs.rhbnc.ac.uk/home/bobv Phone: +44 1784 443691