mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-11 23:24:11 +00:00
fix: use cut
and tail
instead of awk
This commit is contained in:
parent
6c9bbc759d
commit
f1b678290c
@ -54,6 +54,6 @@ mydevil_deploy() {
|
||||
# Usage: ip=$(mydevil_get_ip domain.com)
|
||||
# echo $ip
|
||||
mydevil_get_ip() {
|
||||
devil dns list "$1" | awk '{print $3"\t"$7}' | grep "^A$(printf '\t')" | awk '{print $2}' || return 1
|
||||
devil dns list "$1" | cut -w -s -f 3,7 | grep "^A$(printf '\t')" | cut -w -s -f 2 || return 1
|
||||
return 0
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ dns_mydevil_rm() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
for id in $(devil dns list "$domain" | grep "$fulldomain" | awk '{print $1}'); do
|
||||
for id in $(devil dns list "$domain" | grep "$fulldomain" | cut -w -s -f 1); do
|
||||
_info "Removing record $id from domain $domain"
|
||||
devil dns del "$domain" "$id" || _err "Could not remove DNS record."
|
||||
done
|
||||
@ -97,7 +97,7 @@ mydevil_get_domain() {
|
||||
fulldomain=$1
|
||||
domain=""
|
||||
|
||||
for domain in $(devil dns list | grep . | awk '{if(NR>1)print $1}'); do
|
||||
for domain in $(devil dns list | cut -w -s -f 1 | tail -n+2); do
|
||||
if _endswith "$fulldomain" "$domain"; then
|
||||
printf -- "%s" "$domain"
|
||||
return 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user