mirror of
https://github.com/eddyem/lectures.git
synced 2025-12-06 10:45:09 +03:00
8 lines
159 B
Bash
8 lines
159 B
Bash
#!/bin/sh
|
|
|
|
if [ $# -ne 1 ]; then
|
|
echo "Usage: $0 LEN - get random number with length LEN"
|
|
exit 1
|
|
fi
|
|
cat /dev/urandom | tr -dc '0-9' | fold -w $1 | head -n 1
|