Deutsch English Français Italiano |
<vrvi3t$gce5$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro <ldo@nz.invalid> Newsgroups: comp.os.linux.misc Subject: Re: Useless Use Of Regexes Date: Wed, 26 Mar 2025 00:35:10 -0000 (UTC) Organization: A noiseless patient Spider Lines: 19 Message-ID: <vrvi3t$gce5$2@dont-email.me> References: <vrsfkv$1md7d$1@dont-email.me> <vrsjva$1oouq$1@dont-email.me> <vrso4m$1toah$3@dont-email.me> <vrtm3h$3vdid$1@news1.tnib.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 26 Mar 2025 01:35:10 +0100 (CET) Injection-Info: dont-email.me; posting-host="30bc461f20db310b0809141d3331773a"; logging-data="537029"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/cGsHWE9T3wZejCd4G1YQ2" User-Agent: Pan/0.162 (Pokrosvk) Cancel-Lock: sha1:/FsyOC8NDe6UGpB5r6bL7vrhsuc= Bytes: 1741 On Tue, 25 Mar 2025 08:30:56 +0100, Marc Haber wrote: > I'd prefer a regexp over jq any time. But that's probably wrong. I’ll use whatever’s available. The first thing to do is look for options to customize the output, to reduce or even eliminate the need to pull bits out with regexes or other complex parsing. Example of how not to do things: <https://arstechnica.com/gadgets/2021/09/command-line-wizardry-part-two-variables-and-loops-in-bash/> > N.B.: ip addr --oneline root@theon:~ # ip addr --oneline Command "--oneline" is unknown, try "ip address help". root@theon:~ # ip addr show --oneline Device "--oneline" does not exist. root@theon:~ # ip --oneline addr show [got it]