Explorar o código

Added watch command

koerschens %!s(int64=3) %!d(string=hai) anos
pai
achega
24a5f8b863
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      cvgpu.sh

+ 6 - 1
cvgpu.sh

@@ -3,4 +3,9 @@
 dir=$(dirname "$0")
 python_executable="$dir/miniconda3/bin/python"
 
-$python_executable "$dir"/python/gpu_status.py $@
+if [ "$1" = "watch" ]; then
+    shift
+    watch -n 10 $python_executable "$dir"/python/gpu_status.py $@
+else
+    $python_executable "$dir"/python/gpu_status.py $@
+fi