Sujet : Re: Useless Use Of Regexes
De : mh+usenetspam1118 (at) *nospam* zugschl.us (Marc Haber)
Groupes : comp.os.linux.miscDate : 25. Mar 2025, 08:30:56
Autres entêtes
Organisation : private site, see http://www.zugschlus.de/ for details
Message-ID : <vrtm3h$3vdid$1@news1.tnib.de>
References : 1 2 3
User-Agent : Forte Agent 6.00/32.1186
Lawrence D'Oliveiro <
ldo@nz.invalid> wrote:
On Mon, 24 Mar 2025 21:48:26 +0000, Pancho wrote:
>
On 3/24/25 20:34, Lawrence D'Oliveiro wrote:
>
which can be more easily written using features built into iproute2
itself:
ip addr show to 192.168.1.0/24
Seriously, though, it is often easier to filter output from a standard
command with grep, than it is to learn all the command flags.
>
Don’t forget the option of JSON-format output, for even easier processing
in scripts than messing around with regexes.
I'd prefer a regexp over jq any time. But that's probably wrong.
N.B.: ip addr --oneline
Greetings
Marc
-- ----------------------------------------------------------------------------Marc Haber | " Questions are the | Mailadresse im HeaderRhein-Neckar, DE | Beginning of Wisdom " | Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 6224 1600402