【发布时间】:2018-05-05 10:38:20
【问题描述】:
种子
我为我的数据库播种
curl -s http://site/api/seed/user/1000
测试
我做到了
psql --username=nm -d portal -h 192.168.1.27 -c "SELECT count(*) from users;"
我明白了
count
-------
1000
(1 row)
观看
watch psql --username=nm -d portal -h 192.168.1.27 -c "SELECT count(*) from users;"
我明白了
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;'
我该如何解决这个错误?
【问题讨论】:
-
我讨厌人们对其他人的帖子投反对票,而在评论中没有说任何内容以供 OP 改进。
-
什么是
watch? -
watch将每 1 秒重新运行一次相同的命令。 -
听起来像是
watch中的一个错误,它没有重新引用参数。 -
在这种情况下,我想看看我的种子命令是否工作并且没有挂起。
watch命令将显示我的表在我的数据库中的增量计数。
标签: linux macos unix psql watch