projects
/
feisty_meow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
959edc8
)
fixed port listing to sort numerically
author
Fred T. Hamster
<fred@gruntose.com>
Wed, 8 Nov 2017 17:38:06 +0000
(12:38 -0500)
committer
Fred T. Hamster
<fred@gruntose.com>
Wed, 8 Nov 2017 17:38:06 +0000
(12:38 -0500)
scripts/opensim/find_opensim_ports.sh
patch
|
blob
|
history
diff --git
a/scripts/opensim/find_opensim_ports.sh
b/scripts/opensim/find_opensim_ports.sh
index 39c583e7193352c1c42116e8dc9434524089bd3b..6ef74ada541f745db2f6894bbe570d5f947da390 100644
(file)
--- a/
scripts/opensim/find_opensim_ports.sh
+++ b/
scripts/opensim/find_opensim_ports.sh
@@
-1,12
+1,24
@@
#!/bin/bash
#!/bin/bash
+
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+
outfile="$(mktemp "$TMP/region_ports.XXXXXX")"
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
echo "opensim ports range from $(head -1 $outfile) to $(tail -1 $outfile)"
rm $outfile
+