tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ Files with space

unexpected exit ▻

Redirect pipe back to console in the loop

In article <80r4d8$htv$1@nnrp1.deja.com>,  <sanio111@my-deja.com> wrote:
>is there any way to temporary redirect standard input to console or i
>have to use something like "read key < /dev/`who am i | cut -c 12-24`

Eek!  You can just use /dev/tty which, for each process, is its
controlling terminal.

(Historical ramblings: I believe this is the first example in Unix of a
per-process namespace.  Later ones include /dev/fd, and /proc/self.  The
idea became pervasive in Plan 9.)

Tim.
--
Tim Goodwin   | "People think [ W. Gibson is ] hi-tech because his prose
Leicester, UK | is as pleasant to read as a C++ program." -- JT

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: Redirect pipe back to console in the loop
Date: 16 Nov 1999 16:41:45 -0000
Organization: University of Leicester, UK
Message-ID: <80s1gv$rbk$1@ltpcg.star.le.ac.uk>
References: <80r4d8$htv$1@nnrp1.deja.com>

△ comp.unix.shell △

◅ Files with space

unexpected exit ▻