I can't use bash 5 syntax even after configuring it in MacOSX

前端 未结 3 776
南笙
南笙 2021-01-25 19:54

I am relatively new to bash.

I had bash 3 In my mac by default.

GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18)
Copyright (C) 2007 Free Softw         


        
3条回答
  •  情歌与酒
    2021-01-25 20:12

    homebrew installs programs into /usr/local/bin so if you want to use the version installed by homebrew you need to either run:

    /usr/local/bin/bash --version
    

    or ensure that /usr/local/bin occurs before /bin on your PATH, e.g.

    export PATH=/usr/local/bin:PATH
    

提交回复
热议问题