jsulliva@cvbnet.UUCP (Jeff Sullivan, x4482 MS 14-13) (05/24/90)
I am using SunOS 4.0.3 and have noticed that tee doesn't check the noclobber shell variable in /bin/csh. That is, set noclobber command > temp command > temp temp: File exists. (doesn't overwrite) command | tee temp (OVERWRITES the file) I'm not complaining, I USE that "feature". It beats typing "command >! temp". I would expect this to be true in most BSD flavors, but am not sure about SYS V. Is this a feature, a bug or a design limitation? Just curious, Jeff Sullivan | Computervision/Prime | jsulliva@cvbnet.prime.com "Go Bruins!" | Bedford, MA 01730 | sun!cvbnet!jsulliva
roy@phri.nyu.edu (Roy Smith) (05/26/90)
In <476@cvbnetPrime.COM> jsulliva@cvbnet.UUCP (Jeff Sullivan) writes: > I am using SunOS 4.0.3 and have noticed that tee doesn't check the > noclobber shell variable in /bin/csh. Well, that makes sense since noclobber is a shell variable and tee isn't part of the shell, so it has no way to find out what the value of noclobber is. One could export noclobber as an environment variable and rewrite tee to look at that, but who wants to carry the whole world around in their environment? Lots of programs take output filenames as arguments (dd, cp, mv, etc). Do you want all of them to look at noclobber too? -- Roy Smith, Public Health Research Institute 455 First Avenue, New York, NY 10016 roy@alanine.phri.nyu.edu -OR- {att,cmcl2,rutgers,hombre}!phri!roy "Arcane? Did you say arcane? It wouldn't be Unix if it wasn't arcane!"
gwyn@smoke.BRL.MIL (Doug Gwyn) (05/26/90)
In article <476@cvbnetPrime.COM> jsulliva@cvbnet.UUCP (Jeff Sullivan, x4482 MS 14-13) writes: > I would expect this to be true in most BSD flavors, but am > not sure about SYS V. Is this a feature, a bug or a design > limitation? How could it be otherwise? The "tee" process does not have access to the innards of the shell that invoked it.