From b34689ffcc1280b944b16191d2cfdb3640b8d298 Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Wed, 15 Jan 2020 19:06:08 -0500 Subject: [PATCH] Resolve shellcheck SC219[67] ?grep non-standard SC2196: egrep is non-standard and deprecated. Use grep -E instead. SC2197: fgrep is non-standard and deprecated. Use grep -F instead. Signed-off-by: Thanh Ha Change-Id: Ibbeb8d799c6c31b6706306c4760c371efde573c8 --- shell/jenkins-verify-images.sh | 2 +- shell/job-cost.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shell/jenkins-verify-images.sh b/shell/jenkins-verify-images.sh index a27efd83..d005c52f 100755 --- a/shell/jenkins-verify-images.sh +++ b/shell/jenkins-verify-images.sh @@ -43,7 +43,7 @@ echo "Verifying that cloud has a master configuration file" for cloud in jenkins-config/clouds/openstack/*; do if [[ -f $cloud/cloud.cfg ]]; then # Get the OS_CLOUD variable from cloud config - if ! os_cloud=$(egrep "^OS_CLOUD=" "$cloud/cloud.cfg" | cut -d'=' -f2); then + if ! os_cloud=$(grep -E "^OS_CLOUD=" "$cloud/cloud.cfg" | cut -d'=' -f2); then os_cloud="vex" fi OS_CLOUD=$os_cloud verify_images "$cloud" diff --git a/shell/job-cost.sh b/shell/job-cost.sh index 0d0e55ea..d3ee81e8 100644 --- a/shell/job-cost.sh +++ b/shell/job-cost.sh @@ -29,7 +29,7 @@ fi if [[ -f stack-cost ]]; then echo "DEBUG: $(cat stack-cost)" echo "INFO: Retrieving Stack Cost..." - if ! stack_cost=$(fgrep "total: " stack-cost | awk '{print $2}'); then + if ! stack_cost=$(grep -F "total: " stack-cost | awk '{print $2}'); then echo "ERROR: Unable to retrieve Stack Cost, continuing anyway" stack_cost=0 fi -- 2.16.6