Many times in a bash script there is the need to generate a random string of characters. For instance, I have a docker container that outputs bogus logs for testing and I wanted to ensure that each log line was uniquie.
You can generate a random alpha numeric string in upper/lower case or just lowercase with the following one liners.
32 Character Upper & Lower
1
|
|
32 Character Lower Only
1
|
|