Try:
        printf "create /test3 'sth'  \n create /test3 'sth' " | zkCli
?

This:
        echo "create /test3 'sth'  \n create /test3 'sth’ "
doesn’t actually generate a newline.

# echo "create /test3 'sth'  \n create /test3 'sth' " 
create /test3 'sth'  \n create /test3 'sth’  

-Jeff


> On Jan 9, 2015, at 2:44 AM, Peter Schrammel 
> <[email protected]> wrote:
> 
> Hi,
> 
> is there a way to pass multiple commands to zkCli on the command line?
> 
> this works:
> echo "create /test3 'sth' " | zkCli
> 
> but this doesn't
> echo "create /test3 'sth'  \n create /test3 'sth' " | zkCli
> 
> 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.
> 
> THX
> Peter

Reply via email to