Answer the question
In order to leave comments, you need to log in
cat to a variable. freebsd?
I am writing a bash script, I want to get a two-digit random number to put it in sleep. I write like this in the sss.sh script:
ss=`cat /dev/urandom | tr -d -c '0-9' | fold -w 10 | head -1 | awk '{print substr($0, 1, 2)}'`
echo ss
sh sss.sh
ss
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question