regex help

Linux for blind general discussion blinux-list at redhat.com
Wed Feb 9 21:59:30 UTC 2022


Okay, so basically, whatever's in the braces is treated as a comma
separated array of strings and whatever string the braces are part of
gets duplicated for each entry in the array... and if their are
multiple sets of braces, a test I just did suggests the expansion
covers the entire Cartesian product... at least,

mkdir [1,2,3}test{1,2,3}

generated 9 folders...

Is there a way to define a range? I tried:

mkdir {a-z}{0-9}

But that seems to get interpreted literally, creating a folder named {a-z}{0-9}.

Still, even without a way to handle ranges, this sounds like a very
useful trick and and easy to remember one to boot.




More information about the Blinux-list mailing list