Find and replace string in parameter bash
bash, regex, replace, string
Solution
dbname=${1//./_}
Remove `$` before 1 since `$1` and `${1}` are the same.
Problem
``` $ ./myscript my.site.com ``` How do I replace all dots in the first parameter? Here's my current try but it's returning a bad substition error. ``` #!/bin/bash dbname=${$1//./_} echo $dbname ```