#/bin/sh
# find newest directory by name using: find, grep, sed, sort, head
# 090915

newest_dir=`find /media/archiv/sda5 -maxdepth 1 -type d -print | grep  -e "[0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]" | \
      sed 's/.*\/\(.*\)$/\1/g' | sort -r | head -n 1`         # ok !!!!
echo "newest_dir: $newest_dir"

