title: How can I run ZooKeeper's zkCli.sh commands from Bash?
body: <p>Is it possible to run a zkCli.sh command, like <code>ls /</code> or <code>get /</code>, from Bash directly without going inside the ZooKeeper shell?</p>
  <p>I am using ZooKeeper version 3.4.6-1569965.</p>
  <p>For example, something like this:</p>
  <pre><code>$ ./zkCli.sh get /
  </code></pre>
  <p>I am able to do this only after connecting to the ZooKeeper shell and then running <code>get /</code> from there, like below:</p>
  <pre><code>$ ./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 /
  []
  </code></pre>