Re: don't want to mkdir if it already exists
- From: "Chris F.A. Johnson" <cfajohnson@xxxxxxxxx>
- Date: Wed, 4 Apr 2007 23:00:20 -0400
On 2007-04-05, paintedjazz@xxxxxxxxx wrote:
....
However, I have discovered one more issue that is slightly related.
Besides the my.thumbnails subdirectory, my script also creates
subdirectories
entitled my.padded and my.flexible and this (using the find command)
is what my script is creating now:
./ImageGallery/my.flexible # GOOD
./ImageGallery/my.padded # GOOD
./ImageGallery/my.padded/my.flexible # BAD
./ImageGallery/my.padded/my.thumbnails # BAD
./ImageGallery/my.thumbnails # GOOD
./ImageGallery/my.thumbnails/my.flexible # BAD
./ImageGallery/my.thumbnails/my.padded # BAD
my.flexible and my.padded and my.thumbnails
should never be subdirectories of each other.
Now all three use the same case statement as above.
Is there a way that I could modify the case statement
to prevent this?
It looks as if you have a nested loop. Remove it.
If that doesn't solve the problem, post your script.
--
Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell/>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
.
- References:
- don't want to mkdir if it already exists
- From: paintedjazz
- Re: don't want to mkdir if it already exists
- From: Chris F.A. Johnson
- Re: don't want to mkdir if it already exists
- From: paintedjazz
- Re: don't want to mkdir if it already exists
- From: Chris F.A. Johnson
- Re: don't want to mkdir if it already exists
- From: paintedjazz
- don't want to mkdir if it already exists
- Prev by Date: Re: don't want to mkdir if it already exists
- Next by Date: summary on hexadecimal fields
- Previous by thread: Re: don't want to mkdir if it already exists
- Next by thread: summary on hexadecimal fields
- Index(es):
Relevant Pages
|
|