Is it possible to run a zkCli.sh command, like ls /
or get /
, from Bash directly without going inside the ZooKeeper shell?
I am using ZooKeeper version 3.4.6-1569965.
For example, something like this:
$ ./zkCli.sh get /
I am able to do this only after connecting to the ZooKeeper shell and then running get /
from there, like below:
$ ./zkCli.sh
Connecting to localhost:2181
Welcome to ZooKeeper!
WATCHER::
WatchedEvent state:AuthFailed type:None path:null
JLine support is enabled
WATCHER::
WatchedEvent state:SyncConnected type:None path:null
[zk: localhost:2181(CONNECTED) 0] get /
[]
./zkCli.sh -cmd "get /"
– Protractile