Unable to enable globstar in Bash 4
I put the following unsuccessfully to my .bashrc
shopt -s globstar
I am trying to test the command in action by
ls **/*.c
and by comparing it to
ls */*/*.c
How can you enable globstar in Bash 4?
如果你对这篇文章有疑问,欢迎到本站 社区 发帖提问或使用手Q扫描下方二维码加群参与讨论,获取更多帮助。

评论(1)

Hmm. shopt -s globstar
should work.
To debug, make sure you are running Bash 4:
$SHELL --version
Then check the setting of globstar
:
shopt globstar
If it is unset, try setting it manually:
shopt -s globstar
Now see if that works. If it does, you might want to look into why your .bashrc
isn't working. Did you remember to restart you shell after editing your .bashrc
, or load it with . .bashrc
?
发布评论
需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。