Linux: ASCII random string generator

Generate a random ASCII string (40 printable characters without empty spaces)

$ cat /dev/urandom | tr -dc '[:graph:]' | head -c 40
OR
$ cat /dev/urandom | tr -dc '[:alnum:][:punct:]' | head -c 40

[:lower:]   All lower case letters     abcdefghijklmnopqrstuvwxyz
[:upper:]   All upper case letters     ABCDEFGHIJKLMNOPQRSTUVWXYZ
[:alpha:]   All letters
[:digit:]   All digits                 0123456789
[:alnum:]   All letters and digits
[:punct:]   All punctuation characters !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
[:graph:]   All printable characters, not including space
[:print:]   All printable characters, including space

https://github.com/ITEC4B/ASCII-random-string-generator