Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Compare directories the most efficient way
- X-seq: zsh-users 9556
- From: Jean Chalard <jean.chalard@xxxxxxxxx>
- To: Meino Christian Cramer <Meino.Cramer@xxxxxx>
- Subject: Re: Compare directories the most efficient way
- Date: Tue, 25 Oct 2005 12:27:28 +0900
- Cc: zsh-users@xxxxxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lhndahmLE/SJbezJZTeNvkmI4cPUqwtDgmwDajqhSDIeHtAjYXjurxHUj/w0hjle0ZFWyx1ZcuETLUOx4GEDMTpu4hBv0ZLVyR/q6gJzhLJcFnN5qetcVa2a0zGPhK8lCH6TxRlvnmLCnDnpx3hT76JacSRr6XYWliaFNsD/cTk=
- In-reply-to: <20051025.050856.41172296.Meino.Cramer@xxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20051025.050856.41172296.Meino.Cramer@xxxxxx>
> There are two identical directory trees with binary stuff in it but
> with a different prefix for example:
> /home/user/onetree/.
> and
> /home/user/theothertree/.
I think I may have missed something here, because I can't see why something like
for i in onetree/**/*; do cmp -- "$i" "${i/onetree/theothertree}"; done
...wouldn't work.
It wouldn't split the filenames on spaces, and I don't think any ascii
or non-ascii bizarreness would affect that kind of thing.
> The problem is to write a function/routine/script or whatever to do
> that job. Everything tried result in errors like:
>
> This : file not found
> is : file not found
> one : file not found
> file : file not found
> with : file not found
> spaces : file not found
> .bz2 : file not found
>
> I tried "find <path> -ls | cut -b 69- " as a source for escaped filenames
> in a for/do/done-loop but it failed the same way as mentioned above.
As I see it this is most likely caused by the sh_word_split option set
(which you probably *really* don't want most of the time), and the
absence of any quoting mark.
--
J
"Toi, je te trouve pas la même tête que sur la page précédente" -- Wakamiya
Messages sorted by:
Reverse Date,
Date,
Thread,
Author