get_ip_of_ssh_hostname

This commit is contained in:
hophacker 2019-08-03 23:41:22 +08:00
parent 290a2f1208
commit cbf784de8a

View File

@ -348,3 +348,6 @@ function dc {
fi
docker-compose -f $docker_file_path $@
}
function get_ip_of_ssh_hostname {
ssh -G $1 | awk '/^hostname / { print $2 }'
}