#!/usr/bin/env sh
#
# Loop a JSON list and perform some action
fakelist='["foo", "bar", "baz"]'
echo $fakelist | jq -rc '.[]' | while read item; do
echo $item
done
Handy dandy.
#!/usr/bin/env sh
#
# Loop a JSON list and perform some action
fakelist='["foo", "bar", "baz"]'
echo $fakelist | jq -rc '.[]' | while read item; do
echo $item
done
Handy dandy.