libera/#devuan-dev/ Monday, 2022-03-21

xrogaanyeh, -i means 'in place'04:09
bgstack15One change I noticed recently, although I haven't tested it on Devuan, is that I could no longer use an exclamation point ! on a grep command at the end of a pipe.16:12
bgstack15dnf list installed | ! grep -q 'packagename'16:12
bgstack15started malfunctioning in AlmaLinux 8.16:12
fsmithredbgstack15, is that in a test?16:16
fsmithredI just tried it in beowulf and I get a syntax error message.16:16
bgstack15It was in a script of mine, that I use on the command line, that caches the output of yum/dnf. apt-get/dpkg caches stuff in a way that's way faster than yum.16:16
fsmithredif dpkg -l | ! grep -q linux ; then echo not ; else echo yes ; fi16:17
fsmithredbash: syntax error near unexpected token `!'16:17
bgstack15I haven't touched that script for years.16:17
bgstack15And then now it breaks.16:17
fsmithredif ! dpkg -l |  grep -q systemd ; then echo not ; else echo yes ; fi16:17
fsmithrednot16:17
bgstack15probably some change in bash or something.16:17
bgstack15The readability of your suggested line is not as good as the readability of:16:18
fsmithredyeah, there have been a few. Changes in quoting with respect to spaces is different. Not sure what else.16:18
bgstack15dpkg -l | ! grep -q systemd16:18
fsmithredfor human readers, yeah.16:18
bgstack15I'm not trying to measure the response of "dpkg -l"; I want to know if the grep -q systemd failed.16:18
bgstack15Although pipes do funky things with exit codes.16:18
bgstack15And, as a side rant since it's mildly related: FRICK set -euo pipefail16:19
bgstack15Fails silently, no logging, no indication of which line was last executed, or even which part of a pipe executed.16:19
fsmithredset +x help?16:19
* bgstack15 drops mic16:19
bgstack15I _never_ use set -e, or pipefail in my scripts. I handle my errors.16:20
fsmithredsame here16:20
bgstack15Yeah, I probably need to read a bash changelog.16:21
fsmithredthe fix for my line above is to put the 'if' after dpkg.16:22
* fsmithred does not look forward to re-writing scripts.16:23
_alv_...16:34
golinuxHi, _alv_ !16:50
golinuxThanks for hanging around.  :)16:51
xrogaanbgstack15: isn't the syntax '[!] command | command2' ?18:14
xrogaan> If the reserved word !  precedes a pipeline, the exit status of that pipeline is the logical negation of the exit status as described above.18:15
bgstack15lol, that's the statement from the manual for bash.18:15
bgstack15I swear that my script had this (apparently now-invalid) syntax for years.18:15
bgstack15And I use this script weekly.18:15
xrogaanyou may have been silently running a buggy script for years :/18:24
onefangMaybe try it on a live ancient Devuan?18:24
xrogaanbgstack15: it's breaking (syntax error) because of histexpand18:39
xrogaanit has to be something related to histexpand18:40
fsmithredEnable !  style history substitution.18:41
fsmithred^^^ what does that mean???18:41
xrogaancall previously sent commands18:45
fsmithredyeah, I've only used it with numbers. Still reading.18:45
xrogaan'!echo' will search the history for the first command command starting with 'echo'18:45
xrogaanbgstack15: I'm unsure if your line was valid or not. Why not post to help-bash and ask for clarification?18:49
fsmithredStart a history substitution, except when followed by a blank, newline, carriage return, =  or  (18:49
Xenguyfsmithred, Is there a man page, or ...?18:53
fsmithredman bash18:53
fsmithredfine reading18:53
XenguyOhhh18:54
XenguyThat's a long man page IIRC  = )18:54
fsmithredyeah, it's more than one page18:54
XenguyThe other infamous man page that comes to mind is 'rsync'  8 -)18:54
xrogaanyou can also consult https://www.gnu.org/software/bash/manual/bash.html18:56
bgstack15And not only is `bash(1)` really long, it's a GNU thing, which is still fascinated with info iirc, so I'm guessing the info page for bash is even longer.19:01
gnu_srsI think I'll retire build005 anyway, memory on that box is a little scarce.23:17
gnu_srsIt's not utilized now and if you want I can provide a build host on another (faster) box with more memory.23:17

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!