e-muzica
asked on
bash random string
How can i create in bash a random string of 80 characters like nAHSU987ASNnnn9sdnasus9dha 87ajdJNo79 88
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Then there is no simple tool(so far I know)
One more(but no upper chars):
RSTR=$( ( uuidgen; uuidgen; uuidgen ) | tr "\n-" "xX" | head -c 80 )
and finally, but this is in fact perl programm
RSTR$( perl -e 'while($c<80){ $v=rand(123); next if ($v<48||($v>57&&$v<65)||($ v>90&&$v<9 7)); print(chr($v)); $c++}' )
One more(but no upper chars):
RSTR=$( ( uuidgen; uuidgen; uuidgen ) | tr "\n-" "xX" | head -c 80 )
and finally, but this is in fact perl programm
RSTR$( perl -e 'while($c<80){ $v=rand(123); next if ($v<48||($v>57&&$v<65)||($
ASKER
( ( uuidgen; uuidgen; uuidgen ) | tr "\n-" "xX" | head -c 80 ) is great, thx
ASKER