Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$ ./myscript my.site.com
如何替换第一个参数中的所有点?这是我目前的尝试,但它返回了一个错误的替换错误。
#!/bin/bash dbname=${$1//./_} echo $dbname
dbname=${1//./_}
在 1 之前删除$,因为$1和${1}是相同的。
$
$1
${1}