Bug 552985

Summary: Problem with fgrep and/or grep -F in tcsh-6.14-14.el5_4.2
Product: Red Hat Enterprise Linux 5 Reporter: deanx <dae1>
Component: tcshAssignee: Vitezslav Crhonek <vcrhonek>
Status: CLOSED DUPLICATE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: high Docs Contact:
Priority: low    
Version: 5.4CC: dae1, gholms, rcc2
Target Milestone: rc   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-14 11:16:03 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 deanx 2010-01-06 18:43:22 UTC
Description of problem:

tcsh-6.14-14.el5_4.2 introduced what seems to be a expansion issue when 'fgrep' is run under 'csh'. In particular wildcard expansion of 'fgrep' searches will fail. This may have serious issues of csh scripts.

How reproducible:

100% - see example

Steps to Reproduce:

1. do this in bash:  fgrep 'localhost' /etc/host*
  you should get something like:
/etc/hosts:127.0.0.1            localhost.localdomain localhost
/etc/hosts:::1          localhost6.localdomain6 localhost6

2. Switch to csh, $ csh
 
3.run it again: fgrep 'localhost' /etc/host*
 
You will not get any result.  This is errorneous, and used to work the same in both shells under prior version tcsh-6.14-14.el5.  You can get the same results with 'grep -F'  This is a problem whenever a * filespec is use
 
Actual results:

fgreg is returning empty results in 'csh'

Expected results:

fgrep should return same results in bash and csh


Additional info:

We have reverted tcsh to tcsh-6.14-14.el5 on the users system and the scripts are now running as before.

Comment 1 deanx 2010-01-06 19:42:15 UTC
I shouldda also mentioned this too... the expansion is the problem:

under tcsh-6.14-14.el5;
command : $ echo fgrep 'localhost' /etc/host*

yeilds;
fgrep localhost /etc/host.conf /etc/hosts /etc/hosts.allow /etc/hosts.deny



under tcsh-6.14-14.el5_4.2;

command: $ echo fgrep 'localhost' /etc/host*

yields:

fgrep \l\o


Clearly tcsh-6.14-14.el5_4.2 has an issue here.

Comment 2 deanx 2010-01-07 13:46:18 UTC
Additionally, tcsh also exhibits the same mal-behavior.

Comment 3 Garrett Holmstrom 2010-01-12 23:44:17 UTC
This seems to be fixed in tcsh-6.14-14.el5_4.3.  Is there still more to do here?

Comment 4 Vitezslav Crhonek 2010-01-14 11:16:03 UTC

*** This bug has been marked as a duplicate of bug 529425 ***

Comment 5 deanx 2010-01-14 12:24:44 UTC
Yes this fixes the known issues with this.