Bug 9665

Summary: /etc/profile.d/kde.sh is shel dialect specific
Product: [Retired] Red Hat Linux Reporter: Cameron Simpson <cs>
Component: kdesupportAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-22 03:40:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Cameron Simpson 2000-02-22 03:40:01 UTC
The kde.sh file says
	if ! echo $PATH | grep -q $kdepath; then
This is a bash-specific shellism. It is VITALLY IMPORTANT that
shell startup files do not contain peculiarities of one shell but
are portable shell. My shell for example is a Bourne shell which does
not have the ! builtin (and certainly not anything which acts the
way the above script appears to desire - !ing the entire pipeline).

A portable way to write this would be
	if echo "$PATH" | grep -v -q "$kdepath"; then
which would work in any Bourne shell.

Comment 1 Bernhard Rosenkraenzer 2000-06-12 21:25:02 UTC
Thanks, fixed.