Article View: gnu.bash.bug
Article #321function redirection problem
From: Andy Wai
Date: Fri, 14 Jul 1989 17:48
Date: Fri, 14 Jul 1989 17:48
30 lines
1295 bytes
1295 bytes
The following was discovered by one of the users around here:
Script started on Fri Jul 14 13:23:21 1989
% bash <== invoke bash here
watmath[1]$ function CAT <== define function CAT
bash>{
bash>/bin/cat $@
bash>}
watmath[2]$ CAT hi
Hi! <== this one is fine
watmath[3]$ CAT hi >log <== did an "ls" and "exit" here, not echoed
% cat log <== back to csh, look at the log file
Hi!
watmath[4]$ ls <== "ls" and "exit" shows up in the log file!
hi
log
typescript
watmath[5]$ exit
% exit
script done on Fri Jul 14 13:25:36 1989
Once the output of a function is redirected, it stays redirected after
the function is completed. This happens on all architectures we have.
It was discovered in version 1.01 and still exist in 1.02.
Thanks.
Andy Wai
Math. Faculty Computing Facility
U. of Waterloo
Technical Details
Message-ID:
<8907141748.AA14752@watmath.waterloo.edu>Path:
arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!WATMATH.WATERLOO.EDU!accwaiShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!WATMATH.WATERLOO.EDU!accwai From: accwai@WATMATH.WATERLOO.EDU (Andy Wai) Newsgroups: gnu.bash.bug Subject: function redirection problem Message-ID: <8907141748.AA14752@watmath.waterloo.edu> Date: 14 Jul 89 17:48:28 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 30