help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:07:52 +1000
User-agent: Mutt/1.5.21 (2010-09-15)

On 2013-07-18 14:04, Matthew Cengia wrote:
[...]
> [...]
> > 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.

Yuck. This works, but I don't particularly like it:

printf "%q " ls "address@hidden" | ssh "$host2"

-- 
Regards,
Matthew Cengia

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]