From: "Michael Kjörling" <michael@kjorling.se>
To: coff@minnie.tuhs.org
Subject: Re: [COFF] Powershell better than Bourne shell?
Date: Sat, 20 Nov 2021 15:54:14 +0000 [thread overview]
Message-ID: <8921ba35-4e92-4d21-ae1b-f47f31bb6945@localhost> (raw)
In-Reply-To: <YZgsgBR5MiMLuiT5@mit.edu>
On 19 Nov 2021 18:00 -0500, from tytso@mit.edu (Theodore Y. Ts'o):
> status=$(jq < "$inst_info" 2> /dev/null \
> '.metadata.items[] | select(.key == "status") | .value' | \
> sed -e 's/^"//' -e 's/"$//')
That's likely a UUOS; Useless Use Of Sed. Try with `jq -r` instead.
(Spotted it because I found myself doing the exact same thing not long
ago. I guess that means I'm in good company.)
--
Michael Kjörling • https://michael.kjorling.se • michael@kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”
_______________________________________________
COFF mailing list
COFF@minnie.tuhs.org
https://minnie.tuhs.org/cgi-bin/mailman/listinfo/coff
next prev parent reply other threads:[~2021-11-20 16:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 23:03 Greg 'groggy' Lehey
2021-11-19 1:12 ` Grant Taylor via COFF
2021-11-19 23:00 ` Theodore Y. Ts'o
2021-11-20 15:54 ` Michael Kjörling [this message]
2021-11-19 5:15 ` Adam Thornton
2021-11-19 6:19 ` Andrew Warkentin
2021-11-19 18:44 ` Steffen Nurpmeso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8921ba35-4e92-4d21-ae1b-f47f31bb6945@localhost \
--to=michael@kjorling.se \
--cc=coff@minnie.tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).