39c583e7193352c1c42116e8dc9434524089bd3b
[feisty_meow.git] / scripts / opensim / find_opensim_ports.sh
1 #!/bin/bash
2 outfile="$(mktemp "$TMP/region_ports.XXXXXX")"
3 grep "InternalPort *= *[0-9][0-9]*" "$HOME/opensim/bin/Regions"/* | sed -e "s/.*= *\([0-9]*\).*/\1/" | sort &>$outfile
4 #echo all ports are:
5 #cat $outfile
6 #echo head
7 #head -1 $outfile
8 #echo tail
9 #tail -1 $outfile
10 echo "opensim ports range from $(head -1 $outfile) to $(tail -1 $outfile)"
11 rm $outfile
12