Gentoo Archives: gentoo-user

From: Mike Edenfield <kutulu@××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] scp escape characters
Date: Wed, 16 Apr 2008 14:48:33
Message-Id: 48061219.6020808@kutulu.org
In Reply to: Re: [gentoo-user] scp escape characters by Mick
1 Mick wrote:
2 > On 16/04/2008, dirk.heinrichs.ext@×××.com <dirk.heinrichs.ext@×××.com> wrote:
3 >> Am Mittwoch, den 16.04.2008, 15:06 +0100 schrieb ext Mick:
4 >>
5 >>
6 >> > I was trying to scp a file which had spaces in its name; e.g.
7 >> >
8 >> > This\ is\ the\ name\ of\ it.txt
9 >
10 >> I tried it in my zsh, with TAB-completion (means: I typed "scp
11 >> remote_host:~/Fil<tab>"), and it gives this:
12 >>
13 >> scp remote_host:~/File\\\ with\\\ blanks
14 >>
15 >> And, of course, it copies the file just fine :-)
16 >
17 > Thanks guys, I'll try it next time. Just one thing: if the spaces
18 > need to be escaped at both ends, shouldn't it have just 2 \\, why are
19 > you showing it with 3 \\\ ?
20
21 It's escaping the first slash and the space:
22
23 '\\ \ ' -> '\ ' -> ' '
24
25 --K
26
27 --
28 gentoo-user@l.g.o mailing list