From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24829 invoked by alias); 13 Aug 2013 12:49:14 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17920 Received: (qmail 24068 invoked from network); 13 Aug 2013 12:49:08 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at samsung.com does not designate permitted sender hosts) X-AuditID: cbfec7f4-b7f5f6d000000ff6-00-520a28e47afc Date: Tue, 13 Aug 2013 13:38:59 +0100 From: Peter Stephenson To: Zsh Users Subject: Re: ssh zsh and one off commnad Message-id: <20130813133859.57c69e43@pwslap01u.europe.root.pri> In-reply-to: References: Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmluLIzCtJLcpLzFFi42I5/e/4Vd0nGlxBBn938VjsOLmS0YHRY9XB D0wBjFFcNimpOZllqUX6dglcGTfeiRasZ63Y1NPG0sD4k7mLkZNDQsBE4mfTTVYIW0ziwr31 bF2MXBxCAksZJY5/6IBxmCReTp/ICFLFIqAqseL1TjYQm03AUGLqptlgcREBRYkzv74xgdjC AhoS93sh4rwC9hKHT38F28ApECxxYP59li5GDqChARIbnquBhPkF9CWu/v3EBHGEvcTMK2eg WgUlfky+xwJiMwtoSWze1sQKYctLbF7zlnkCo8AsJGWzkJTNQlK2gJF5FaNoamlyQXFSeq6h XnFibnFpXrpecn7uJkZIAH7Zwbj4mNUhRgEORiUe3oyPHEFCrIllxZW5hxglOJiVRHjjGLmC hHhTEiurUovy44tKc1KLDzEycXBKNTCa72T58/twkPGXvqXJ5ftmpR1W2d5WETRhddqaCTNk 8hu+JS7LuN9kfPnbevPv1ZFOU2z+yOv9ejqrUiD6/o67J6N/Bh6d9nV7zfYMluOdIvLtVaGn m7a3z3/m9VL2b9u/p1M12Eu930rznhfL270l92GnjcxNv9mfTi+vuZO97ssSObZsozMySizF GYmGWsxFxYkAzs1KsR4CAAA= On Tue, 13 Aug 2013 13:00:39 +0100 Wawrzek Niewodniczanski wrote: > I hope you can help me in this situation. The default shell on remote > machine is bash, but I would like from time to time run a zsh command or > rather set of command in a loop. My test command for some reason doesn't > work: > > ssh remote "zsh -c 'for i (/usr/*(/)) {ls $i }'" ^^ The problem is that the $i is being substituted by the local shell, because it's in a double-quoted expression (the single quotes inside that are not special to the local shell). Probably putting a backslash in front of the $ should do the trick. pws