Subject: Re: obsoleting sysctl(8)'s -w flag
To: <>
From: David Laight <david@l8s.co.uk>
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
--
David Laight: david@l8s.co.uk