[CentOS] OT -- BASH

Thu Jun 22 12:43:23 UTC 2006
Rodrigo Barbosa <rodrigob at darkover.org>

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

On Thu, Jun 22, 2006 at 07:21:22AM -0500, Robert wrote:
> Can someone explain why this:
>   find . -depth -print0 | cpio --null -pmd /tmp/test
> will copy all files in and below the current directory -and- this:
>   find . -depth -print | grep -v .iso$ | wc -l
> will count all the non-iso files -and- this:
>   find . -depth -print | grep  .iso$ | wc -l
> will count *only* the iso files -but- this:
> find . -depth -print0 | grep -v .iso$ | cpio --null -pmd /tmp/test
> doesn't copy *anything*?   

Because the "grep" in the middle will mess up with the "print0/--null"
trick.

- -- 
Rodrigo Barbosa
"Quid quid Latine dictum sit, altum viditur"
"Be excellent to each other ..." - Bill & Ted (Wyld Stallyns)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFEmpBrpdyWzQ5b5ckRAnqcAJ90qGty5cYtUCGqWOSi9tsBMHFl/wCePycq
Frc4ukIuN1cOQpYt7vnaSnc=
=QjBz
-----END PGP SIGNATURE-----