delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/11/08/06:23:00

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE
X-Spam-Check-By: sourceware.org
Message-ID: <4CD7DD6B.6050004@edgar-matzinger.nl>
Date: Mon, 08 Nov 2010 12:22:19 +0100
From: Edgar Matzinger <edgar AT edgar-matzinger DOT nl>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.1.6-1.fc13 Lightning/1.0b2 Thunderbird/3.1.6
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cp: omitting directory, for copying only files, sed
References: <ib3gtb$v4$1 AT dough DOT gmane DOT org> <6488B010-E946-4EA3-BE77-586ACD794EEB AT edgar-matzinger DOT nl> <ib695r$uer$1 AT dough DOT gmane DOT org> <0A09BBFB-0267-4D0B-B736-4F8AB8B84C32 AT edgar-matzinger DOT nl> <4CD74321 DOT 3060902 AT laposte DOT net>
In-Reply-To: <4CD74321.3060902@laposte.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Cyrille,

On 08/11/10 01:24, Cyrille Lefevre wrote:
> 

> this one is a little less performant than the one provided due to

Still beats typing in by hand ;-)

> multiple fork, but a little simple :
> 
> sed -ne 's|\\|/|g;/^File /s///p' $2 | xargs -I{} echo cp {} "$W"

I do think this is most elegant solution! This even works on HP-UX...
;-) I saw the backslashes in the text file also but left them as is and
left them up to the OP.

Kind regards, Edgar.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJM191rAAoJEENMxv7g8VYwYa8H/jX5P1pFsKsLIMWZBLdUn4CS
s/AaHbr97PeBzbJAp4ngpQQreBgyV/4+s94J5lXbe6qjpT2Kw0+q7kn2S3ji1i9Y
P00wtq4BF8S7legh1CWBubuAvxhmdZ+w3Bx1Isj7rfZkmauLjKUlrZeZb7njlJ5h
Owh8fSh6C+WTNy9Df6j9XltGoLgy6KVVdnHwOmUg5LFwOrVWUencpVRMWYTqVXzj
FF/ZHLayA8xgOfwIYCH3ZH8xmxb/QvoXLp6egxWJ3zV7kgQoNjzXNKVBV8TCX5/t
Ae4zrC2rAl7KG1j6pujq0JPGAmYSOqGNAaDW1AONldoor9E6YKf2Ym/cgFqFkrU=
=2ZmI
-----END PGP SIGNATURE-----

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019