remove extra hyphen from name
This commit is contained in:
parent
74dc9404b6
commit
2c8c24e237
@ -22,7 +22,7 @@ do
|
|||||||
appName=$(grep -E "\s$i\s" "dns_file" | awk '{print $3}' | sed 's/-[^-]*-[^-]*$//' | sed 's/-0//' | head -n 1)
|
appName=$(grep -E "\s$i\s" "dns_file" | awk '{print $3}' | sed 's/-[^-]*-[^-]*$//' | sed 's/-0//' | head -n 1)
|
||||||
port=$(echo "$all_ports" | grep -E "\s$appName\s" | awk '{print $6}' | grep -Eo "^[[:digit:]]+{1}")
|
port=$(echo "$all_ports" | grep -E "\s$appName\s" | awk '{print $6}' | grep -Eo "^[[:digit:]]+{1}")
|
||||||
echo -e "$appName $appName.$i.svc.cluster.local $port"
|
echo -e "$appName $appName.$i.svc.cluster.local $port"
|
||||||
done | nl -s ") " -b t | sed '0,/\s\s\s/{s/\s\s\s/- ----- -------- ----/}'| column -t -N "#,Name,DNS_Name,Port"
|
done | nl -s ") " -b t | sed '0,/\s\s\s/{s/\s\s\s/- ---- -------- ----/}'| column -t -N "#,Name,DNS_Name,Port"
|
||||||
rm dns_file
|
rm dns_file
|
||||||
}
|
}
|
||||||
export -f dns
|
export -f dns
|
Loading…
Reference in New Issue
Block a user