Re: [announce] Small skarnet.org update
i've just updated the execline-man-pages and s6-man-pages repos accordingly: * https://github.com/flexibeast/execline-man-pages/releases/tag/v2.8.3.0.1 * https://github.com/flexibeast/s6-man-pages/releases/tag/v2.11.1.0.1 Alexis. "Laurent Bercot" writes: Hello, New versions of some skarnet.org packages are available. The changes are minor, mostly quality-of-life and small additions driven by the new version of s6-overlay. There are bugfixes all around, so users are encouraged to upgrade even if they're not using s6-overlay. The new versions are the following: skalibs-2.11.2.0(minor) execline-2.8.3.0(minor) s6-2.11.1.0 (minor) s6-portable-utils-2.2.4.0 (minor) s6-linux-init-1.0.7.3 (release)
Re: [announce] Small skarnet.org update
Why not use printf %s\\n "$maybe_begins_with_dash" instead of s6-echo? - Not all systems provide printf. I know it's in POSIX, but I've worked on many embedded systems that didn't have it. And not all containers have a full set of coreutils. - It's more complex and thus slower and more error-prone, even by a tiny amount. You shouldn't need to think about how many backslashes you're gonna need to write a newline when all you want is print a goddamn string to stdout. - I personally dislike anything involving the C printf() function, for reasons that I don't want to go into today (I've ranted enough about it on the IRC channel). All in all, these arguments are pretty weak, so you can absolutely use printf if you want to, but they were enough for me to bite the bullet and write an echo command I could rely on. (Not that it was very hard to do.) -- Laurent
Re: [announce] Small skarnet.org update
On Thu, Mar 10, 2022 at 8:24 PM Laurent Bercot wrote: > I'd rather keep s6-echo as simple and intuitive as possible - it's > meant to write stuff to stdout and nothing else. I'm already pretty > angry that this command exists - the only reason why s6-echo needs to > be a thing is that no two implementations of the "echo" command do > the exact same thing, so "echo" is unusable when you have a string > that starts with a dash (or a string that you *don't know*, because > it could start with a dash and yield unpredictable outcomes.) > If it weren't for that, I would gladly scrap s6-echo. So I'm not going > to add stuff to it and make *more* software depend on it. Why not use printf %s\\n "$maybe_begins_with_dash" instead of s6-echo?
Re: [announce] Small skarnet.org update
March 10, 2022 8:49 PM, "Jeff" wrote: > what about adding the following feature to s6-echo? > > command line option -D enables double-output mode, > so instead of using stdout for regular output, and stderr > for warnings and errors, everything is sent both to stdout > and stderr. This is intended to redirect stderr to a log file, > so full output can be both shown on console and logged. Try oblog: https://web.obarun.org/software/oblog/oblog.html
Re: [announce] Small skarnet.org update
what about adding the following feature to s6-echo? command line option -D enables double-output mode, so instead of using stdout for regular output, and stderr for warnings and errors, everything is sent both to stdout and stderr. This is intended to redirect stderr to a log file, so full output can be both shown on console and logged. The command you're looking for is named "tee". :) I'd rather keep s6-echo as simple and intuitive as possible - it's meant to write stuff to stdout and nothing else. I'm already pretty angry that this command exists - the only reason why s6-echo needs to be a thing is that no two implementations of the "echo" command do the exact same thing, so "echo" is unusable when you have a string that starts with a dash (or a string that you *don't know*, because it could start with a dash and yield unpredictable outcomes.) If it weren't for that, I would gladly scrap s6-echo. So I'm not going to add stuff to it and make *more* software depend on it. -- Laurent
Re: [announce] Small skarnet.org update
what about adding the following feature to s6-echo? command line option -D enables double-output mode, so instead of using stdout for regular output, and stderr for warnings and errors, everything is sent both to stdout and stderr. This is intended to redirect stderr to a log file, so full output can be both shown on console and logged.