I came across extglob extended template for bash. http://wiki.bash-hackers.org/syntax/pattern
I am studying this case:
Imagine the directory structure as follows:
/basedir/2017/02/26/uniquedirs1/files.log /basedir/2017/02/27/uniquedirs2/files.log /basedir/2017/02/28/uniquedirs3/files.log /basedir/2017/03/01/uniquedirs4/files.log /basedir/2017/03/02/uniquedirs5/files.log
If I want to list the catalog files 2017/02/27 and 2017/02/28 , I can simply write:
ls /basedir/2017/02/@("27"|"28")/*/files.log
Awesome! \ O /
Now the question. How to define multiple directories in an extended bash template?
This does not work:
ls /basedir/2017/@("02/28"|"03/01")/*/files.log ls /basedir/2017/@("02\/28"|"03\/01")/*/files.log
Is there any way to define multiple directories for an "extended template"?
source share