1
0
vestacp-user 5 жил өмнө
parent
commit
06a43cadc1
1 өөрчлөгдсөн 1 нэмэгдсэн , 7 устгасан
  1. 1 7
      test/test_actions.sh

+ 1 - 7
test/test_actions.sh

@@ -7,13 +7,7 @@ V_TEST="$HESTIA/test"
 
 # Define functions
 random() {
-    MATRIX='0123456789'
-    LENGTH=$1
-    while [ ${n:=1} -le $LENGTH ]; do
-        rand="$rand${MATRIX:$(($RANDOM%${#MATRIX})):1}"
-        let n+=1
-    done
-    echo "$rand"
+    cat /dev/urandom | tr -dc [:num:] | head -c$1
 }
 
 echo_result() {