# list=$(ls /var/log/packages/) ; for that in $list ; do that=${that%-*} ; that=${that%-*} ; that=${that%-*} ; echo $that ; done