From bf0f5507ad44a7f6d4c3805dba4464a7181aba45 Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 15 Mar 2017 10:19:34 -0500 Subject: [PATCH] Replaced 'grep -Eq' with 'egrep' --- dns_infoblox.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dns_infoblox.sh b/dns_infoblox.sh index 0bb71d28..76a46e95 100644 --- a/dns_infoblox.sh +++ b/dns_infoblox.sh @@ -29,7 +29,7 @@ dns_infoblox_add() { result=`curl -k -u $Infoblox_Creds -X POST $baseurlnObject` -if _info "$result" | grep -Eq 'record:txt/.*:.*/default'; then +if _info "$result" | egrep 'record:txt/.*:.*/default'; then _info "Successfully created the txt record" return 0 else @@ -60,13 +60,13 @@ _info $baseurlnObject result=`curl -k -u $Infoblox_Creds -X GET $baseurlnObject` -if _info "$result" | grep -Eq 'record:txt/.*:.*/default'; then +if _info "$result" | egrep 'record:txt/.*:.*/default'; then # Extract object ref objRef=`grep -Po 'record:txt/.*:.*/default' <<< $result` objRmUrl="https://$Infoblox_Server/wapi/v2.2.2/$objRef" rmResult=`curl -k -u $Infoblox_Creds -X DELETE $objRmUrl` # Check if rm succeeded - if _info "$rmResult" | grep -Eq 'record:txt/.*:.*/default'; then + if _info "$rmResult" | egrep 'record:txt/.*:.*/default'; then _info "Successfully deleted $objRef" return 0 else