Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Bob Vickers <bobv@dcs.rhbnc.ac.uk>
To: "Eric Le Donné" <eledonne@metrica.co.uk>
Subject: Re: Shell scripting under OSF1
Date: 1998/02/09	[thread overview]
Message-ID: <34DEEB09.41C6@dcs.rhbnc.ac.uk> (raw)
In-Reply-To: 886783241.6919.0.nnrp-03.c246a7b2@news.demon.co.uk


Eric Le Donné 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
-- 
======================================================================
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



  parent reply	other threads:[~1998-02-09  5:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-06  5:00 Shell scripting under OSF1 Eric Le Donn�
1998-02-06  5:00 ` Mike Iglesias
1998-02-09  5:00 ` Kylan Coghlan
1998-02-12  5:00   ` Jim Seagraves
1998-02-13  5:00     ` Jerome FENAL
1998-02-09  5:00 ` Bob Vickers [this message]
1998-02-09  5:00 ` Doug Hamilton
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox