我知道如何通过以下语法执行远程bash脚本:
curl http://foo.com/script.sh | bash
Run Code Online (Sandbox Code Playgroud)
要么
bash < <( curl http://foo.com/script.sh )
Run Code Online (Sandbox Code Playgroud)
这给出了相同的结果.
但是如果我需要将参数传递给bash脚本呢?脚本在本地保存时可能:
./script.sh argument1 argument2
Run Code Online (Sandbox Code Playgroud)
我试过这样的几种可能性,没有成功:
bash < <( curl http://foo.com/script.sh ) argument1 argument2
Run Code Online (Sandbox Code Playgroud) config/database.yml中套接字声明的用途是什么?
示例代码:
staging:
adapter: mysql
encoding: utf8
database: (database)
pool: 5
username: (user)
password: (pass)
socket: /tmp/mysql.sock # <--------- this line
Run Code Online (Sandbox Code Playgroud)
我的应用程序正常工作,这条线是否被评论.那有什么用呢?我有什么理由可以留下它,评论它或改变它的价值?