Find doesn't expand {}
Chuck Karish
karish at forel.stanford.edu
Tue Aug 8 18:22:23 AEST 1989
In article <12502 at well.UUCP> tmh at 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 at forel.stanford.edu
More information about the Comp.unix.questions
mailing list