Hacker News new | past | comments | ask | show | jobs | submit login

This ones a hard one. Since "--version-sort" isn't standard anyways, lets assume we can use flags which are common to BSD and GNU. Furthermore, lets assume bash or zsh so we can use "read -d ''".

In that case, how about:

  IFS='' read -d '' latest < <(find $pattern -prune -print0 | sort -z --reverse --version-sort)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: