Hide Forgot
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.
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...