i.e. some stuff and junk about Python, Perl, Matlab, Ruby, Mac X, Linux, Solaris, ...
for f in *.tiff ; do fbase=`echo $f | cut -d '.' -f 1`; echo $fbase; convert -crop 510x510 +repage $f sub/${fbase}_%02d.tiff ; done