6 ms·
What makes this gnuland?
by ketralnis 7y ago
What makes this gnuland?
- arminiusreturns 7y agobash, grep, awk, are all gnu tools
- jandrese 7y agogrep is from AT&T Unix version 6. awk is from AT&T Unix version 7. Bash is from Gnu but the script is actually plain old Bourne Shell from AT&T Unix version 7.
- pard68 7y ago`shuf` is not POSIX, so that would make this BASH.
- shakna 7y agoIt 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.
- kiwidrew 7y agoActually, "${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...
- anthk 7y agoThere is a free `shuf` for OpenBSD
- arminiusreturns 7y ago"AWK was significantly revised and expanded in 1985–88, resulting in the GNU AWK implementation written by Paul Rubin, Jay Fenlason, and Richard Stallman, released in 1988.[8] GNU AWK may be the most widely deployed version" AWK wikipedia entry If you are on linux, you are using GNU grep, not unix grep. Others have addressed bash... so wrong on all counts.
- kryptiskt 7y agoNone of it is specific to GNU and you can easily do it without any GNU tools on MacOS, if you've heard about that niche operating system.
- arminiusreturns 7y agoDid MacOS finally get up to bash v4 or do you still have to upgrade manually?
- anthk 7y agoI am doing this just fine with a base OpenBSD and this ISC licensed `shuf` counterpart: https://github.com/ibara/shuf https://github.com/ibara/shuf
- anthk 7y agoI use BSD ksh, awk, and shuf compiled from https://github.com/ibara/shuf https://github.com/ibara/shuf
- smabie 7y agohe's using sh not bash. Grep, sh, and awk predate gnu by a long-time. It's not like they invented these tools, merely made their own implementations.