Awk/Gawk not working after install gawk on M1 Using brew, I installed gawk on my m1. upon doing so, awk does not work.
Before install gawk:
❯ awk -version
awk version 20200816
❯ which awk
/usr/bin/awk

Then I install gawk and add the path to the binary to my $PATH
==&gt; Downloading https://homebrew.bintray.com/bottles/gawk-5.1.0.arm64_big_sur.bo
Already downloaded: /Users/jtsmith/Library/Caches/Homebrew/downloads/78854a178070158dd17ca1789b20ecabe69f924bad7052337c019a8efeb30178--gawk-5.1.0.arm64_big_sur.bottle.tar.gz
==&gt; Pouring gawk-5.1.0.arm64_big_sur.bottle.tar.gz
  /opt/homebrew/Cellar/gawk/5.1.0: 90 files, 5.4MB

❯ which awk
/opt/homebrew/Cellar/gawk/5.1.0/bin/awk

Now, if I try to use awk/gawk, it always results in a killed
❯ awk -version
[1]    10790 killed     awk -version
❯ gawk -version
[1]    10796 killed     gawk -version
❯ echo &quot;test test&quot; | awk '{ gsub(/ /,&quot;&quot;); print $0}';
[1]    10800 done       echo &quot;test test&quot; |
       10801 killed     awk '{ gsub(/ /,&quot;&quot;); print $0}'

I assume they are clashing but can't figure out what's going on.
Additional details:
❯ /usr/bin/awk -version 
awk version 20200816
❯ /opt/homebrew/Cellar/gawk/5.1.0/bin/gawk -version  
[1]    12436 killed     /opt/homebrew/Cellar/gawk/5.1.0/bin/gawk -version
I had the same issue with git. After reinstalling MacOS the issue went away.