Bash Generate Secure Random String Python Replace Function