Red Hat Bugzilla – Bug 70668
colorls.sh backgrounds egrep command with pdksh
Last modified: 2007-04-18 12:45:11 EDT
Description of Problem:
As of the 7.3.93, the /etc/profile.d/colorls.sh script will malfunction during
every login if the user's shell is ksh instead of bash. It backgrounds this
! egrep -qi "^COLOR.*none" $COLORS
Version-Release number of selected component (if applicable):
Every login with the ksh shell.
Steps to Reproduce:
1. Set your login shell to ksh
This output during login:
 + Done ! egrep -qi "^COLOR.*none" $COLORS
No such output during login.
I was able to make this behavior stop by changing /etc/profile.d/colorls.sh.
if ! egrep -qi "^COLOR.*none" $COLORS &>/dev/null; then
if ! egrep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null; then
I assume that &> is some bash-specific syntax. It just ends up backgrounding
the preceding command right there with ksh.
This is related to bug 70383.