LoginSignup
0
0

More than 5 years have passed since last update.

jqコマンドをShellの中で再帰的に実行する。

Posted at

絶対忘れるのでメモ。

#!/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\" のやり方をよく忘れます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0