Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: script within find



BTW, how'd I copy just the directory structure from /tifs/ to /jpgs/
-- directories only -- in the shortest and prettiest way?  :)

If I'm understanding your question correctly, you want to create a
copy of ./tifs called ./jpgs, and have the copy only contain
directories, no files.  Is that correct?

If so, the following should tackle it:

for dir in tifs/**/*(/)
mkdir -p ${dir/tifs/jpgs}

I'm sure that there's a better way to do this that only requires an
"mkdir -p" on each leaf directory, but I can't think of it at the
moment and this should do what you want, if a bit inefficiently.

~Matt



Messages sorted by: Reverse Date, Date, Thread, Author