From: Fred T. Hamster Date: Wed, 8 Nov 2017 17:38:06 +0000 (-0500) Subject: fixed port listing to sort numerically X-Git-Tag: 2.140.90~36 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=4a33084da9c535541da6da88332a1ae3a05399ec;p=feisty_meow.git fixed port listing to sort numerically --- diff --git a/scripts/opensim/find_opensim_ports.sh b/scripts/opensim/find_opensim_ports.sh index 39c583e7..6ef74ada 100644 --- a/scripts/opensim/find_opensim_ports.sh +++ b/scripts/opensim/find_opensim_ports.sh @@ -1,12 +1,24 @@ #!/bin/bash + +source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" + outfile="$(mktemp "$TMP/region_ports.XXXXXX")" -grep "InternalPort *= *[0-9][0-9]*" "$HOME/opensim/bin/Regions"/* | sed -e "s/.*= *\([0-9]*\).*/\1/" | sort &>$outfile -#echo all ports are: -#cat $outfile -#echo head -#head -1 $outfile -#echo tail -#tail -1 $outfile +grep "InternalPort *= *[0-9][0-9]*" "$HOME/opensim/bin/Regions"/* | sed -e "s/.*= *\([0-9]*\).*/\1/" | sort -g &>$outfile + +if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then + sep + echo all ports are: + cat $outfile + sep + echo head + head -1 $outfile + sep + echo tail + tail -1 $outfile + sep +fi + echo "opensim ports range from $(head -1 $outfile) to $(tail -1 $outfile)" rm $outfile +