Skip to content

Commit

Permalink
Hardened ALL the sed
Browse files Browse the repository at this point in the history
  • Loading branch information
chesty committed Feb 13, 2012
1 parent cbaeb95 commit f8149a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gapps-linode-dns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ API_URL="https://api.linode.com/?api_key=${API_KEY}\
&api_action=domain.list"
DOMAIN_ID=`$CMD "${API_URL}" | sed 's/.*"DOMAINID":\([0-9]\+\),.*"DOMAIN":"'"${DOMAIN}"'".*/\1/'`

echo "${DOMAIN_ID}" | if [ ! -z `sed 's/[0-9]\+//'` ]; then
if [ `echo -n "${DOMAIN_ID}" | sed 's/[0-9]\+/1/'` != "1" ]; then
echo "Domain not found"
exit
fi
Expand Down

0 comments on commit f8149a8

Please sign in to comment.