4.[123]bsd csh script handling bug--who's got the "right" fix?
Arthur David Olson
ado at elsie.UUCP
Tue Mar 25 07:53:46 AEST 1986
If you
repeat 25 echo oops 6789012345678901234567890123456789012345678901 >> file
and then either
csh file
or
cat file | csh
you get this output:
oops: Command not found.
789012345678901: Command not found.
where "780912345678901" turns out to be what's stored in "file" starting at the
1025th byte. Could be disastrous if you had something such as
reform -r *
starting at the 1021st byte--this would end up doing the dreaded
rm -r *
Now let's set aside the question of whether you really "ought to" use "sh"
rather than "csh" for scripts. I myself use "sh." However, there are users
who want to create "csh" scripts. And so the question: what's the best way
to fix the above bug and prevent possible calamity for such users?
--
Bugs is a Warner Brothers trademark.
Bug is a Volkswagen trademark.
--
UUCP: ..decvax!seismo!elsie!ado ARPA: elsie!ado at seismo.ARPA
DEC, VAX, Elsie & Ado are Digital, Borden & Shakespeare trademarks.
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list