I wrote a script to make a file called filename.md5 on each file it finds of the type *.bin. Here is the code:
Code:
#!/bin/sh
OLDIFS="$IFS"
IFS='
'
for i in $(find "/home/cisco" -iname *.bin);
do
md5sum $i >> md5sum.log
md5sum $i > $i.md5
done
I'd like to take this md5 file and move it to the folder its located in plus up one directory to 'md5'. So for example:
mkdir $i-directory-only/md5
mv $i.md5 $i-directory-only/md5
Whats the easiest way to do this?