I have more than hundred directories named
SP_[number]_date. I'd like to rename all to just
I can only figure out how to do that by
mv SP_1_date SP_1 but that will take ages. Can I rename all at once? I thought that I could do something like
for num in ./*; do mv SP_$num_date SP_$num; done but it doesn't do the trick.