aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/slw22
1 files changed, 14 insertions, 8 deletions
diff --git a/bin/slw b/bin/slw
index 5c93c26..03ed074 100755
--- a/bin/slw
+++ b/bin/slw
@@ -1,24 +1,30 @@
#! /bin/bash
+rand() {
+ tr -dc 0-9 < /dev/urandom | head -c 5 | sed 's/^0*//'
+ echo
+}
+
reset
while [ true ]; do
- CARS=$(( ${RANDOM} % 16 + 1 ))
+ CARS=$(( $(rand) % 16 + 1 ))
+ FLAGS=""
- if [ $(( ${RANDOM} % 2 )) -eq 0 ]; then
+ if [ $(( $(rand) % 2 )) -gt 0 ]; then
FLAGS="${FLAGS}-a "
fi
- if [ $(( ${RANDOM} % 2 )) -eq 0 ]; then
- FLAGS="${FLAGS}-c"
+ if [ $(( $(rand) % 2 )) -gt 0 ]; then
+ FLAGS="${FLAGS}-c "
fi
- if [ $(( ${RANDOM} % 2 )) -eq 0 ]; then
- FLAGS="${FLAGS}-l"
+ if [ $(( $(rand) % 2 )) -gt 0 ]; then
+ FLAGS="${FLAGS}-l "
fi
- if [ $(( ${RANDOM} % 2 )) -eq 0 ]; then
- FLAGS="${FLAGS}-w"
+ if [ $(( $(rand) % 2 )) -gt 0 ]; then
+ FLAGS="${FLAGS}-w "
fi
sl -${CARS} ${FLAGS} | lolcat