Re: [Help-bash] script with ssh and filenames with spaces
From:
Matthew Cengia
Subject:
Re: [Help-bash] script with ssh and filenames with spaces
Date:
Thu, 18 Jul 2013 14:04:25 +1000
User-agent:
Mutt/1.5.21 (2010-09-15)
On 2013-07-18 03:48, address@hidden wrote:
> Thanks for reply Matthew,
>
> I've included your suggestion into my example script.
> Be advised this is an example. I have excluded many unneeded lines for
> clarity.
> The "#do search 'x' for a hostname; get host1" is only pseudo-code,
> replacing some of those "unneeded lines"
> I will not need a for loop, as the search algorithm in the pseudo-code
> produces a single hostname.
> "search x" produces hostname "ccn000" and "search y" produces hostname
> "ccn001"
>
[...]
> echo ls "address@hidden" | ssh "$host2"
[...]
Oops, I obviously wasn't paying attention when I wrote this. echo
expands the quotes before they get passed to ssh. I've not yet though
about this hard enough to find a good solution to it.
I think Greg was probably onto something with his here-doc, but I can't
get that to work either.
--
Regards,
Matthew Cengia