Bash Generate Secure Random String Python Replace Char In String