From cb62e3036b450d134ce162a28cb91ea732dcaba4 Mon Sep 17 00:00:00 2001 From: "Philip K. Warren" Date: Wed, 22 Jan 2014 11:31:44 -0600 Subject: [PATCH] Allow ZooKeeper script to accept arguments. Update zookeeper-shell.sh to support passing additional arguments to the ZK client. --- bin/zookeeper-shell.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/zookeeper-shell.sh b/bin/zookeeper-shell.sh index 92cce76..95007fa 100755 --- a/bin/zookeeper-shell.sh +++ b/bin/zookeeper-shell.sh @@ -14,10 +14,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -if [ $# -ne 1 ]; +if [ $# -lt 1 ]; then - echo "USAGE: $0 zookeeper_host:port[/path]" + echo "USAGE: $0 zookeeper_host:port[/path] [args...]" exit 1 fi -exec $(dirname $0)/kafka-run-class.sh org.apache.zookeeper.ZooKeeperMain -server $1 \ No newline at end of file +exec $(dirname $0)/kafka-run-class.sh org.apache.zookeeper.ZooKeeperMain -server "$@" -- 1.8.5.3