Skip to content

Instantly share code, notes, and snippets.

@SeongJuMoon
Created August 3, 2020 10:27
Show Gist options
  • Select an option

  • Save SeongJuMoon/005bc0dbfb4ac70dbb8fd5d783094013 to your computer and use it in GitHub Desktop.

Select an option

Save SeongJuMoon/005bc0dbfb4ac70dbb8fd5d783094013 to your computer and use it in GitHub Desktop.
#!/bin/bash
LIST=$(echo "<spec1>,<spec2>," | tr "," "\n")
if [ -z $(which yq) ]; then
echo "yq is not installed"
exit 128
else
for DISCOVERY in $LIST
do
echo "$DISCOVERY"
#cat $FILE | yq w - $DISCOVERY $1 > $2
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment