On 19 Nov 2021 18:00 -0500, from tytso(a)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(a)kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”