I use android : Termux APP but bash scritpt can't support `echo $RANDOM` === #!/bin/sh echo -n 'small 4 : ' echo `seq 1 10 | shuf | head -4 ` echo -n 'large 2 : ' echo `seq 15 5 100 | shuf | head -2` echo -n 'target : ' echo `shuf -i 200-999 -n 1` echo =============================== echo -n 'Use RANDOM : ' echo $RANDOM === output ``` $ uname -a Linux localhost 4.14.117-perf+ #1 SMP PREEMPT Thu Aug 20 00:23:47 2020 aarch64 Android $ ./math.sh small 4 : 6 8 3 4 large 2 : 30 60 target : 822 =============================== Use RANDOM : $ ```
75 x 10 + 100 = 850 (4 + 2) x 3 = 18 850 + 18 = 868
I use android : Termux APP
but bash scritpt can't support `echo $RANDOM`
===
#!/bin/sh
echo -n 'small 4 : '
echo `seq 1 10 | shuf | head -4 `
echo -n 'large 2 : '
echo `seq 15 5 100 | shuf | head -2`
echo -n 'target : '
echo `shuf -i 200-999 -n 1`
echo ===============================
echo -n 'Use RANDOM : '
echo $RANDOM
===
output
```
$ uname -a
Linux localhost 4.14.117-perf+ #1 SMP PREEMPT Thu Aug 20 00:23:47 2020 aarch64 Android
$ ./math.sh
small 4 : 6 8 3 4
large 2 : 30 60
target : 822
===============================
Use RANDOM :
$
```