kyo*_*kyo 7 unix linux macos watch psql
我为我的数据库播种
curl -s http://site/api/seed/user/1000
Run Code Online (Sandbox Code Playgroud)
我做到了
psql --username=nm -d portal -h 192.168.1.27 -c "SELECT count(*) from users;"
Run Code Online (Sandbox Code Playgroud)
我有
count
-------
1000
(1 row)
Run Code Online (Sandbox Code Playgroud)
watch psql --username=nm -d portal -h 192.168.1.27 -c "SELECT count(*) from users;"
Run Code Online (Sandbox Code Playgroud)
我有
Every 2.0s: psql --username=nm -d portal -h 192.168.1.27 -... bh-macbook-pro-15-512gb.local: Tue Nov 21 15:19:08 2017
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `psql --username=nm -d portal -h 192.168.1.27 -c SELECT count(*) from users;'
Run Code Online (Sandbox Code Playgroud)
我该如何修复这个错误?
提供命令作为单个带引号的参数:
watch 'psql --username=nm -d portal -h 192.168.1.27 -c "SELECT count(*) from users;"'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3740 次 |
| 最近记录: |