From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27688 invoked from network); 9 Feb 2006 21:03:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,HTML_MESSAGE autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 Feb 2006 21:03:30 -0000 Received: (qmail 8956 invoked from network); 9 Feb 2006 21:03:23 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Feb 2006 21:03:23 -0000 Received: (qmail 15119 invoked by alias); 9 Feb 2006 21:03:15 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9897 Received: (qmail 15108 invoked from network); 9 Feb 2006 21:03:14 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 Feb 2006 21:03:14 -0000 Received: (qmail 7819 invoked from network); 9 Feb 2006 21:03:14 -0000 Received: from wproxy.gmail.com (64.233.184.194) by a.mx.sunsite.dk with SMTP; 9 Feb 2006 21:03:13 -0000 Received: by wproxy.gmail.com with SMTP id i3so393029wra for ; Thu, 09 Feb 2006 13:03:11 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=ksEprTnxiAyyCUIeEqlJhAumekkL3TTrdT3xdvccWcVOx2XJJnDWd2b+rHzpK9C/5UjY/Yxh9IDZi7mrb/0ZpXKfSf7IJ5pCcJnJjzD4DzG7L0VDQjAhgKlNwVeD5N7QR1YmvHH87q9nNtW6zC7akA8frWtNMH5oa1kNB9sRhmM= Received: by 10.54.147.1 with SMTP id u1mr1947046wrd; Thu, 09 Feb 2006 12:58:47 -0800 (PST) Received: by 10.54.79.14 with HTTP; Thu, 9 Feb 2006 12:58:46 -0800 (PST) Message-ID: <7c737f300602091258o49d1902cke43c6d7219db125e@mail.gmail.com> Date: Thu, 9 Feb 2006 12:58:46 -0800 From: Deliverable Mail To: zsh-users@sunsite.dk Subject: colons in names to scp MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4042_27339872.1139518726885" ------=_Part_4042_27339872.1139518726885 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I need to copy files via scp from a zsh script. Say, $1 holds a file name containing ':'. When I do scp $1 $host:$dir I get an error from scp, treating the prefix of $1 before : as a source hos= t name. What's the right way to quote it -- '$1' would preclude interpolatio= n of $1, which is exactly why $1 is used in the first place.. Cheers, Alexy. ------=_Part_4042_27339872.1139518726885 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
I need to copy files via scp from a zsh script.  Say, $1 holds a = file name containing ':'.  When I do
 
scp $1 $host:$dir
 
I get an error from scp, treating the prefix of $1 before : as a sourc= e host name.  What's the right way to quote it -- '$1' would preclude = interpolation of $1, which is exactly why $1 is used in the first place..
 
Cheers,
Alexy.
------=_Part_4042_27339872.1139518726885--