Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

`shuf` is not POSIX, so that would make this BASH.


It wouldn't necessarily make it Bash. That would mean using actual Bash features. It's still non-portable sh, because it relies on an extra program being available, but it isn't relying on Bash itself - none of expansions or so on.

This is what makes it Bash:

    file="${1:-~/.mrkdb}"
Not shuf.


Actually, "${name-word}" has been part of the Bourne shell since the beginning, and the "${name:-word}" extension is specified in recent versions of the POSIX standard...


There is a free `shuf` for OpenBSD




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

Search: