Complete reimplementation to support cross platform usage without namespaces
This commit is contained in:
8
scripts.d/10-random.sh
Normal file
8
scripts.d/10-random.sh
Normal file
@@ -0,0 +1,8 @@
|
||||
function random() {
|
||||
if [[ $# -eq 0 ]]; then
|
||||
num=32
|
||||
else
|
||||
num=$1
|
||||
fi
|
||||
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $num | head -n 1
|
||||
}
|
||||
Reference in New Issue
Block a user