Alex why are you printing printf "$pass_output\n" where are you setting pass_output? This wasn't necessary. Also I think for script it's best to output the only intended things so that output can be piped you implementation doesn't suit that e.g I could have copied the output of script or use it for automation but this is not possible. Also why use clear printf with new line. This are all unnecessary staffs. For me short and simple
#!/bin/bashread-p"How many characters you would like the password to have? " pass_length
tr-dc'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' </dev/urandom | head-c pass_length
Alex why are you printing
printf "$pass_output\n"
where are you settingpass_output
? This wasn't necessary. Also I think for script it's best to output the only intended things so that output can be piped you implementation doesn't suit that e.g I could have copied the output of script or use it for automation but this is not possible. Also why use clearprintf
with new line. This are all unnecessary staffs. For me short and simpleGood call, Arif! That was left over from the first version of the script which was later on changed! Thanks for pinpointing this.