Bug 698124
| Summary: | 4.1.7(1)-release disallows a function grep() incorrectly | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | George R. Goffe <grgoffe> |
| Component: | bash | Assignee: | Roman Rakus <rrakus> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 14 | CC: | maxamillion, rrakus, tsmetana |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-04-21 14:37:47 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: | |||
Alias is not function. In your declaration of function bash didn't know you are declaring a function (grep is command). Use `function' reserved word. Roman, Thanks for your help with this one. I have another question though. Why does this cause me trouble with 4.1.7 (current FC14 bash, no?) and NOT with bash 4.2? George... Roman, And I'm really curious why the "echo -en" stuff works on 4.1.7 and not on 4.2. Regards, George... (In reply to comment #2) > Roman, > > Thanks for your help with this one. I have another question though. > > Why does this cause me trouble with 4.1.7 (current FC14 bash, no?) and NOT with > bash 4.2? > > George... I don't know. I have reproduced it (function vs. alias) on bash 4.1 and 4.2. (In reply to comment #3) > Roman, > > And I'm really curious why the "echo -en" stuff works on 4.1.7 and not on 4.2. > > Regards, > > George... I don't know what are you talking about. Anyway, using printf instead of echo is prefered! Roman, The scripts I was referring to came from the initscripts package. I got my bash4.2 from the gnu ftp site and installed the patches in that directory. Did you install them as well? Regards, George... |
Description of problem: My rc file has a function grep() which gives an error message Version-Release number of selected component (if applicable): 4.1.7(1)-release How reproducible: always Steps to Reproduce: 1.4.1.7(1)-release 2.define a function grep() { /bin/grep -i $* } 3.observe error message Actual results: bash: /.grgrc: line 615: syntax error near unexpected token `(' bash: /.grgrc: line 615: `grep()' Expected results: an alias for grep which always uses the -i flag Additional info: The latest bash in ftp.gnu.org does NOT have this problem but things like "echo -en..." are failing when I install this newer bash in /bin/bash.