]> Sergey Matveev's repositories - sgmon.git/blobdiff - probelist.sh
Ability to set default number of attempts
[sgmon.git] / probelist.sh
index 6cafcb2d3a837b600d07761cb342b2ce1a4f696f..6e6eca27238476fa59ae95a1eef0d667ed043502 100755 (executable)
@@ -1,6 +1,9 @@
 #!/bin/sh -e
 
-find . -mindepth 1 -type d -not -name ".*" | while read probe ; do
-    [ -x $probe/run ] || continue
-    echo ${probe#./}
-done | sort
+nondot() {
+    find $1 -mindepth 1 -maxdepth 1 -type d -not -name ".*" | while read d ; do
+        [ -e $d/run ] && echo ${d#./} || nondot $d
+    done
+}
+
+nondot . | sort