Hello all,
I'm very new to shell scripting and need quite urgently to do this thing for my student job. I have a directory called "vectors" with a bunch of files all named "[something].vector". also i have for each of those files a directory with the name [something]. I now want to move each of those *.vector files into its appropriate folder.
that's what i have produced so far and which is probably totally wrong:
It would be great if you guys helped me!!
thanks! jonathan
FILES="vectors/*\.vector"
for f in $FILES
do
echo "Processing $f"
DIR=$(sed 's/\..*//' "$f")
mv $f $DIR
done