Globstar: New Bash Globbing Option

Source : Linux Journal
Normally, if you use the pattern ** on the command line it acts the same as the * pattern.
$ shopt -s globstar
$ ls **
file1
dir1/file2
dir1/file3
dir2/file4
$ shopt
if you want to test it in a script you can use the -q option to shopt and test the exit status
if shopt -q globstar; then
...
if

Comments

Popular Posts