3 ms·
Apparently timeout(1) is part of GNU Coreutils. I wasn't sure after reading whether it was part of Bash itself.
by frou_dh 1y ago
Apparently timeout(1) is part of GNU Coreutils. I wasn't sure after reading whether it was part of Bash itself.
- blueflow 1y ago[flagged]
- jeffhuys 1y ago“These kinds”…? Unnecessary flaming.
- blueflow 1y agoOf course I'm very judgemental towards people who ignore the established knowledge of the field and instead rely on social hearsay. Call me old and grumpy.
- johnisgood 1y agoNot just ignore, but actively avoid it. Many people do not like to read.
- couscouspie 1y agoTo be fair, I presume learning a tool by manual is not very efficient. At least I personally find the manuals of most utilities lacking in detail and it hence difficult to understand what a certain thing is actually doing and how to use it just from reading the manual. Furthermore, reading about functionality feels like a waste of time, when you are not specifically needing it at the moment. I doubt anybody who is fluent in everything Vim has to offer learned that by reading through the manual once or twice.
- blueflow 1y agoFurthermore, reading about functionality feels like a waste of time yeah, but simplified, this is how you end up with programmers that write an if statement 10 times because they don't know what a for loop is. The waste of time still happens elsewhere.
- t-3 1y ago> I doubt anybody who is fluent in everything Vim has to offer learned that by reading through the manual once or twice. The vim manual only explains the flags and how/where to access the documentation and tutorial. You don't read it to "become fluent" in using the TUI application, you read it to learn about how to run the program from the commandline.
- jonhohle 1y agoIf you haven’t, look at the FreeBSD man pages, when possible (most things in coreutils). They are infinitely better than the GNU versions.
- johnisgood 1y agoI recommend OpenBSD man pages as well. BTW on Linux, I have "man-all" aliased to "man -a", as I want to read all available man pages (e.g. POSIX, GNU, Linux).
- mdaniel 1y agoAlso, watch out because like many things the timeout command and args differs between /usr/bin/timeout or gtimeout in Brew (that's where the "g" prefix comes from). I haven't used BSD in order to know what it's story is
- aidenn0 1y agoPrefixing 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 1y agoBut also sucks because the g-prefixed versions aren’t installed on Linux systems which means scripts that rely on them are not portable.
- mdaniel 1y agoThankfully 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 ...
- chasil 1y ago> It’s a shame we can’t use timeout with until directly The until keyword is part of the POSIX.2 shell specification, which does not include any sort of timeout functionality. It could be implemented in bash, but it would not be portable to other shells (Debian dash being the main concern). This is the reason that it is implemented as a separate utility. Search for "The until loop" below to see the specification. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V...