Skip to content

Commit

Permalink
escape double quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
oarbusi committed Mar 14, 2024
1 parent a4ddb51 commit 4ba0069
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/get-terraform-supported-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ done

versions_array=$(printf '%s\n' "${json_array}" | jq -r '.[] | .version')

formatted_output=$(echo "$versions_array" | awk 'BEGIN { ORS = "" } {gsub(/^v/,"",$1); gsub(/\.0$/,".x",$1); printf("%s\"%s\"", (NR==1?"":", "), $1)}' | sed 's/"/\\"/g')
formatted_output=$(echo "$versions_array" | awk 'BEGIN { ORS = "" } {gsub(/^v/,"",$1); gsub(/\.0$/,".x",$1); printf("%s\"%s\"", (NR==1?"":", "), $1)}' | sed 's/,"/," /g')

echo "[$formatted_output]"

0 comments on commit 4ba0069

Please sign in to comment.