Skip to content

Instantly share code, notes, and snippets.

@ilivessevili
Created May 25, 2016 03:38
Show Gist options
  • Save ilivessevili/20f4a4e70da64fb804af87bee841d7fb to your computer and use it in GitHub Desktop.
Save ilivessevili/20f4a4e70da64fb804af87bee841d7fb to your computer and use it in GitHub Desktop.
#!/bin/bash
[ -n "$1" ] || exit 1
UUID=`nova list | grep $1 | awk '{print $2 }'`
PORT=`ps -ef | grep $UUID | grep -iEo port=.{5}`
echo "instance name: $1 => $PORT"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment