Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
#!/bin/sh # Define Version Number & Description version="1.0" desc="Wrapper for vmrun" program=`echo $0 |sed -e 's#^\./##'` # Define help help=" $program $version, $desc\n Usage: $program \[Options\] command\n Example: $program -p > command\n \n Options \n \n -s Show the command that will be run--no action taken.\n -p Prompt for password.\n -H Remote hostname (default=local hostname).\n " # see wget -h for "help" layout ideas # define variables host=`hostname` # if no arguments then print help and exit if [ $# = 0 ]; then echo $help && exit fi # options followed by a ":" take arguments--";" optional arguments while getopts "hspH:" option; do case "$option" in h) echo $help && exit;; s) show=1;; p) passwd=1;; H) host="$OPTARG";; [?]) echo "Exiting due to illegal option" && exit;; esac done shift `expr $OPTIND - 1` # do stuff here if ! [ -v $passwd ] ; then stty -echo read -p "Password: " passw; echo stty echo command="vmrun -T server -h http://$host:8222/sdk -u frank -p $passw" else command="vmrun -T server -h http://$host:8222/sdk" fi if ! [ -v $show ] ; then echo $command $@ else $command $@ fi exit 0
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|How to check files recursively from multiple directories and get latest file in bash script||6||126|
|how to run my script during boot in rhel 7||14||786|
|how awk substr works and also how index works in inside substr?||4||140|
Join the community of 500,000 technology professionals and ask your questions.