使用带有 -f 选项的 cqlsh

Using cqlsh with -f option

我们可以像这样使用cqlsh -f吗?

psql -U maint_sa -p 3254 postgres -f - << EOT
SHOW ALL;
EOT

在 cqlsh 上我有以下内容:

cqlsh -f - << EOT
> DISCRIBE KEYSTORE ks1;
> EOT
Can't open '-': [Errno 2] No such file or directory: '-' 

您是否尝试过将其回显到命令行:

echo "DESC KEYSPACE ks1; exit" | cqlsh