I'm new to bash, and coding. I have a list of files:
test-T01___2022.txt
test-T01__2021.txt
test-T01_NONE.txt
test-T02___2022.txt
test-T02__2021.txt
test-T02_NONE.txt
test-T03___2022.txt
test-T03__2021.txt
test-T03_NONE.txt
I'm trying to write a script to create folders T01 (containing *T01 files), T02 (containing all files with T02), etc. I'm trying with wildcards and regexps and something similar to this post but having some trouble. I appreciate some help.
Many thanks!