tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ pipe buffering in ksh?

Process ID question ? ▻

Question from Kerninghan & Pyke's "THE UNIX PROGRAMMING ENVIRONMENT"

In article <slrn7r4750.bub.ken@pulsar.halcyon.com>,
Ken Pizzini <ken@halcyon.com> wrote:
>Actually, rm _could_ discover this, if it was felt to be worth
>the extra code.

I once wrote an unlinker that first recursively expanded any directories
mentioned on the command line, then, if it was about to unlink more than
a single item, listed all the items and asked for a single confirmation
of the entire process.

So `un foo' always removes foo, provided it is a file or an empty
directory.  But `un bar', where bar is a non-empty directory, or `un *',
where there is more than one file in the current directory, lists
all the files and directories to be deleted, and asks for confirmation.

I thought it was rather a nice interface, although I suppose `un /'
would have taken a long time to say anything...

Tim.
--
Tim Goodwin   | "You don't need to do drugs in order to
University of | think that the government's policies are
Leicester, UK | stupid and dangerous." -- David Bancroft

Original headers:

From: tjg@ltpcg.star.le.ac.uk (Tim J Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: Question from Kerninghan & Pyke's "THE UNIX PROGRAMMING ENVIRONMENT"
Date: 18 Aug 1999 16:24:59 +0100
Organization: University of Leicester, UK
Message-ID: <7pej91$4dv$1@ltpcg.star.le.ac.uk>
References: <37B1D617.E75E5DBB@geometricsoftware.com>
  <jdoherty-1108991053380001@192.168.2.36>
  <slrn7r4750.bub.ken@pulsar.halcyon.com>

△ comp.unix.shell △

◅ pipe buffering in ksh?

Process ID question ? ▻