Sort of new to scripting, but here's what I want to do.
I've got a lot of files that get dumped into a single directory every morning. These file names only differ by their first four characters:
I have directories for abcd, dcba, 1234, etc. I'd like a script that takes anything starting with abcd, and automatically dump it into the abcd directory. Here's what I've got started:
mv $FILE $DUMDIR/configs/abcd/
Is there a way to have:
FILE="first four characters of the filename"
mv $FILE $DUMDIR/configs/"first four chars...."
Hope that makes sense....?