I am newby to Bash, Ubuntu 16.04.
I have tons of files, which seems like:
aaaa1111 aaaa1112 aaaa1113 aaaa1114 ... aaab1111 aaab1112 aaab1113 aaab1114 ... aaac1111 aaac1112 ... (and so on ...)
Anyway, the pattern is 4 characters + and digits. All I want to do is making the directory based on the 4 characters, and putting the corresponding files into the directory.
aaaa1111 aaaa1112 aaaa1113 aaaa1114 ...
will be put into the directory of aaaa.
aaab1111 aaab1112 aaab1113 aaab1114 ...
will be put into the directory of aaab.
I tried to 'sed', 'mv', others, but didn't work out well.