Skip to content

Commit

Permalink
Cleaning up some of the syntax, a lot more to standardize
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Gross committed Jun 9, 2011
1 parent c703ae0 commit 726f000
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions ip-priv-get-by-id.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,14 @@

usage()
{
cat << EOF
echo "\
usage: $0 options
This script adds takes the instance ID of an AWS Instance and returns the private IP address
OPTIONS:
-h Show this message
-i Instance ID Ex: i-1234abcd
EOF
-i Instance ID Ex: i-1234abcd " >&2
}

# Checks the Instance ID passed in to be of the valid format of 8 hex digits
Expand All @@ -32,6 +30,7 @@ check_instance_id()
return 0
;;
* )
echo "[ERROR]Invalid Instance ID format" >&2
exit 1
;;
esac
Expand Down Expand Up @@ -81,7 +80,6 @@ do
check_instance_id $INSTANCE_ID
if [[ $? == 1 ]]
then
echo "Invalid Instance ID format"
usage
exit 1
fi
Expand Down

0 comments on commit 726f000

Please sign in to comment.