Rename digital camera files based on EXIF header

I use this scriptlet to have my digicam files in order.

#!/bin/bash
jhead -nf"%Y%m%d_%H%M%S" *
jhead -cmd "jpegtran -progressive &i > &o" *.jpg
exiftran -ai *.jpg
#jhead -cmd "mogrify -quality 90 &i" *.jpg
chmod ugo-x *.jpg
jhead -ft *.jpg