Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2FC8F172A2 for ; Fri, 9 Jan 2015 21:13:19 +0000 (UTC) Received: (qmail 67082 invoked by uid 500); 9 Jan 2015 21:13:18 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 66994 invoked by uid 500); 9 Jan 2015 21:13:18 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 66542 invoked by uid 99); 9 Jan 2015 21:13:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jan 2015 21:13:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jpotter-zookeeper@codepuppy.com designates 208.118.232.39 as permitted sender) Received: from [208.118.232.39] (HELO mx.atof.net) (208.118.232.39) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jan 2015 21:13:13 +0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on tinderblast.atof.net X-Spam-Level: X-Spam-ASN: X-Spam-Report: * -3.5 ALL_TRUSTED Passed through trusted hosts only via SMTP * -1.5 KHOP_THREADED Message references or replies to another message X-Spam-Relay-Country: Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: Passing multiple commands to zkCli on the commandline From: Jeff Potter In-Reply-To: <54AF86DB.6040804@preisanalytics.de> Date: Fri, 9 Jan 2015 16:10:51 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <2F621463-9584-44FC-81B7-282A95EE14D1@codepuppy.com> References: <54AF86DB.6040804@preisanalytics.de> To: user@zookeeper.apache.org X-Mailer: Apple Mail (2.1993) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-5.0 required=5.4 tests=ALL_TRUSTED,KHOP_THREADED autolearn=ham version=3.3.1 Try: printf "create /test3 'sth' \n create /test3 'sth' " | zkCli ? This: echo "create /test3 'sth' \n create /test3 'sth=E2=80=99 " doesn=E2=80=99t actually generate a newline. # echo "create /test3 'sth' \n create /test3 'sth' "=20 create /test3 'sth' \n create /test3 'sth=E2=80=99 =20 -Jeff > On Jan 9, 2015, at 2:44 AM, Peter Schrammel = wrote: >=20 > Hi, >=20 > is there a way to pass multiple commands to zkCli on the command line? >=20 > this works: > echo "create /test3 'sth' " | zkCli >=20 > but this doesn't > echo "create /test3 'sth' \n create /test3 'sth' " | zkCli >=20 > what I'd like to do is to authenticate and then create nodes (chef = setup of a server) so splitting the multiple zkCli commands into = multiple bash commands doesn't work. >=20 > THX > Peter