https://bugzilla.novell.com/show_bug.cgi?id=258429 Summary: improper ksh syntax in /etc/bash.bashrc results in redefined "which" Product: SUSE Linux 10.1 Version: Final Platform: Other OS/Version: SuSE Linux 10.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: jmichaud@sgi.com QAContact: qa@suse.de On SLES 10.1, when I start up ksh, I see a job go into the background (twice because /etc/bash.bashrc is invoked twice), and the "which" command no longer works: vortix2 103% ksh [1] 27175 [1] 27177 jmichaud@vortix2:/store/jmichaud> which ls ksh[222]: local: not found [No such file or directory] ksh[228]: whence: -P: unknown option Usage: whence [-afpv] name ... jmichaud@vortix2:/store/jmichaud> This is because of the following lines in /etc/bash.bashrc: ... 214 alias rd=rmdir 215 alias md='mkdir -p' 216 if test "$is" = "bash" && ! type -p which &> /dev/null ; then 217 # 218 # Other shells use the which command in path (e.g. ash) or 219 # their own builtin for the which command (e.g. ksh and zsh). 220 # 221 _which () { ... In "type -p which &> /dev/null", the redirection should probably either be 1) something like "type -p which > /dev/null 2>&1", OR 2) reworked to become two separate "if" tests: ... if test "$is" = "bash" ; then if test ! type -p which &> /dev/null; then ... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.