I know I can use a wildcard to extract files with names of a specific format in bash using the asterisk, like so:
$ ls
a01 a02 a03 a04 a05 a06 a07 a08 a09 b01 b02 b03 b04 b05 b06 b07 b08 b09
$ ls a*
a01 a02 a03 a04 a05 a06 a07 a08 a09
$ ls b*
b01 b02 b03 b04 b05 b06 b07 b08 b09
But if I wanted to do something like move all the files starting with a to a directory called a
and move all the files starting with b to a directory called b
, how would I do that with one command?
Can you do something like this:
$ mv *0* */
But somehow reference the first asterisk in the move-to argument?