nyni je funkce
[mirrors/Programs.git] / bash / serial_loopback_test.sh
index 83c28404037785c32fb282deb9a08529e15fff11..8b945fa5ca4d554c8d8c180ddcc008e908c2aeae 100755 (executable)
@@ -1,7 +1,11 @@
 #!/bin/sh
+#
 #Serial line tester v0.3
-#Tested in busybox ash
 #(c) Tomas Mudrunka 2022-2024
+#
+#Tested in: busybox ash, bash
+
+function serial_loopback_test() {
 
 trylimit=0
 seconds=0
@@ -69,3 +73,7 @@ exec 6<&-
 echo TRANSMITTED: $trycnt, ERRORS: $errcnt, SECONDS: $(($(date +%s)-$datestart))
 [ "$errcnt" = "0" -a "$trycnt" -gt 0 ] && exit 0
 exit 255
+
+}
+
+serial_loopback_test "$@"
This page took 0.133802 seconds and 4 git commands to generate.