$ ./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
dbname=${1//./_}
Remove $
before 1 since $1
and ${1}
are the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With