Path: utzoo!attcan!uunet!peregrine!ccicpg!cci632!rit!tropix!moscom!ur-valhalla!uhura.cc.rochester.edu!sunybcs!rutgers!sun-barr!decwrl!shelby!portia!forel!karish From: karish@forel.stanford.edu (Chuck Karish) Newsgroups: comp.unix.questions Subject: Re: Find doesn't expand {} Message-ID: <3273@portia.Stanford.EDU> Date: 8 Aug 89 08:22:23 GMT References: <12502@well.UUCP> Sender: USENET News System Reply-To: karish@forel.stanford.edu (Chuck Karish) Distribution: all Organization: When necessary Lines: 15 In article <12502@well.UUCP> tmh@well.UUCP (Todd M. Hoff) wrote: >Why doesn't this work: > > find . -type d -print -exec mkdir /xx/yy/zz/{} \; > >The '{}' doesn't expand out to the filename ... Because the parser in find is too crude to recognize a token that's not delimited by white space. Try this, instead: find . -type d -print | sed 's+^+/xx/yy/zz/+' | xargs mkdir Chuck Karish {decwrl,hpda}!mindcrf!karish (415) 493-7277 karish@forel.stanford.edu