cp: omitting directory, for copying only files, sed

Edgar Matzinger edgar@edgar-matzinger.nl
Mon Nov 8 11:22:00 GMT 2010


-----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



More information about the Cygwin mailing list