1
0
Fork 0
This repository has been archived on 2024-06-28. You can view files and clone it, but cannot push or open issues or pull requests.
Umweltdatenmessung/diverses/rand.sh
2014-01-19 18:26:23 +01:00

8 lines
280 B
Bash
Executable file

a=0
while true
do
a=$(($a + $((RANDOM % 10)) - 5)) # a um eine zufällige Zahl zwischen -5 und 5 ändern
#a=a+[Zufallszahl von 0-32767] modulo 10 (um eine Zahl von 0-10 zu bekommen) -5 (-> -5 bis 5)
echo -ne "${a}\r" #keine neue Zeile und Steuerzeichen beachten
sleep 0.5
done