
On Mon, 17 Mar 2025 at 10:16, D. Hugh Redelmeier via talk <talk@gtalug.org> wrote:
From: Giles Orr via talk <talk@gtalug.org>
$ gr() { grep --color=auto "$@" ; } bash: syntax error near unexpected token `('
Does this tell you anything interesting?
$ type 'gr' $ type gr
Does it ever. On all the other machines: gr is a function gr () { grep --color=auto "$@" } But on the machine in question: $ type gr gr is aliased to `grep --color=auto ' (Same answer whether I ask `type 'gr'` or `type gr`.) I was initially unable to determine where that alias was being set, but when I did `unalias gr` I could then set the "gr" function without Bash complaining, so that's clearly the problem! (The alias was being set by a very old file in /etc/ ...) Thank you so much. -- Giles https://www.gilesorr.com/ gilesorr@gmail.com