BASH – Generate a Random String
In a recent project, I needed a function that would generate a random string for me. In my case, I was creating a random file name to store some data, but there are other uses as well, so I am posting the BASH code here in the hope that it will help others out ther eon the net writing BASH scripts and need a good random string function: #!/bin/bash function randomString { # if a param was passed, it’s the…