I read on a forum that to find a random string, you should use the following syntax:
od -a -A n /dev/urandom | head -30 | tr -d ' ' | tr -d '\n' | awk '{print substr($0,1,256)}'
how could I put this output to the variable ‘var’ instead of displaying it on the screen?
Capture it with backticks: ``