Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ssh zsh and one off commnad
On Tue, 13 Aug 2013 13:00:39 +0100
Wawrzek Niewodniczanski <main@xxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author