Subject: Re: obsoleting sysctl(8)'s -w flag
To: <>
From: David Laight <>
List: tech-userlevel
Date: 03/06/2002 12:15:52
On Tue, Mar 05, 2002 at 01:33:06PM -0500, Bill Sommerfeld wrote:
> > No, stdin of a script is the script
> If it were, the following script would print "hello world":
> #! /bin/sh
> cat
> hello world
> Try it and see.

Yes I had brain failure!
Both ls and rm tend to behave differently in a script, but
only because you redirect stdout/stdin.

You could ask for confirmation if -w is absent and the
input is a terminal.  A script could redirect stdin to
force an error.


David Laight: