Path: 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 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