絶対忘れるのでメモ。
#!/bin/bash -e
set -x
retry_file="main.retry"
host_list="hosts.jq"
while read x; do
cat ${host_list} | jq -r "sort_by(.fqdn) |.[] | if .fqdn == \"$x\" then .fqdn, .is_compute_host else empty end"
done < ${retry_file}
\"$x\"
のやり方をよく忘れます。