Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
aidenn0
on May 26, 2025
|
parent
|
context
|
favorite
| on:
TIL: timeout in Bash scripts
Prefixing GNU coreutils with "g" is common on most non-Linux Unix systems; it prevents conflicts with the base system (gmake/gtar vs make/tar).
jonhohle
on May 26, 2025
[–]
But also sucks because the g-prefixed versions aren’t installed on Linux systems which means scripts that rely on them are not portable.
mdaniel
on May 26, 2025
|
parent
[–]
Thankfully bash tolerates that, if the script author cares, e.g.
gnu_sed=gsed if ! command -v $gnu_sed; then gnu_sed=$(detector_wizardry) fi $gnu_sed -Ee ...
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: