Skip to content

Instantly share code, notes, and snippets.

@ytnobody
Created December 21, 2015 02:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ytnobody/fd714697e836a44fde3c to your computer and use it in GitHub Desktop.
Save ytnobody/fd714697e836a44fde3c to your computer and use it in GitHub Desktop.
tutum_container_uuid () {
service_name=$1
tutum service inspect $(tutum service ps | awk '$1=="'$service_name'"{print($2);}') |
awk '
/"containers": \[/, /\]/ {
if ($0 ~ /\/api\/v1\/container\//) {
split($1, flagment, "/");
print(substr(flagment[5],1,8));
}
}
'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment