We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3468957 commit 7ff4964Copy full SHA for 7ff4964
wordpress/wp-post.sh
@@ -98,7 +98,7 @@ resolve_host() {
98
local result=()
99
100
# Try to get IPv4 address
101
- ipv4="$(ping -4 -c 1 "$host" | awk -F'[()]' '{print $2}' | head -n 1)"
+ ipv4="$(ping -4 -c 1 "$host" | grep -oP '(?<=\()[^)]+' | head -n 1)"
102
103
# Fallback to find IP
104
ip_fallback="$(getent hosts "${host}" | awk '{ print $1 }')"
0 commit comments