From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: ssh zsh and one off commnad
Date: Tue, 13 Aug 2013 13:38:59 +0100 [thread overview]
Message-ID: <20130813133859.57c69e43@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <CAC7-vpC7RY2rZ_phZD7ZeNxn2WM0YihLyo_eiL_+K61Et9uJbQ@mail.gmail.com>
On Tue, 13 Aug 2013 13:00:39 +0100
Wawrzek Niewodniczanski <main@wawrzek.name> 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
next prev parent reply other threads:[~2013-08-13 12:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 12:00 Wawrzek Niewodniczanski
2013-08-13 12:38 ` Peter Stephenson [this message]
2013-08-13 13:30 ` Wawrzek Niewodniczanski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130813133859.57c69e43@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).