[COFF] Powershell better than Bourne shell?
Michael Kjörling
michael at kjorling.se
Sun Nov 21 01:54:14 AEST 2021
On 19 Nov 2021 18:00 -0500, from tytso at 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 at kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”
More information about the COFF
mailing list