Re: [OT] one more UNIX question
Subject : Re: [OT] one more UNIX question
From: "Mark J. Reed" <email@hidden >
Date: Wed, 13 Jun 2007 20:54:13 -0400
Delivered-to: email@hidden
Delivered-to: email@hidden
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=BgzW1qgbm5k0w80nVcQsQnZSyAIi6pn4vD9RhJUrXIyKqJxmQ+rDJu5raQ0E7ciqRppjpissfpmE/YC8k3VbfjPvmOgO7VFRvOjnm03ExD+XPdeU/zoH8wzN4WzQ/Xgdl+RPCVtCkB1J8FK35hENjfQbhTFp08yW9HZ+hgGCpzk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=iBgVJ79lfraSwngdVqldPVQj6Ez7nPXaBNZuUVCBWR2IeepOuTUS8XICv74iK3/UxLzTb4kjyzuGu9UNHmZugX6NHdm0bco1wM95kJ8tc/int8+zkN4rl1KFS+1IGdJVZwv9KoqUVMZxwbSuK8++b8lmPgaVHkqx2b/tmk6Vc0A=
On 6/13/07, Mark J. Reed <email@hidden> wrote:
Another option would be to use a loop. Of course, the downside here
is that you wind up executing mkdir multiple times instead of just
once with a huge argument list.
... unless you just build the argument list in the loop and then call
mkdir once at the end, of course:
tops=(list of sub folders)
subs=(sub sub folders)
all=()
for top in "${tops[@]}"; do
for sub in "${subs[@]}"; do
all=("${all[@]}" "$top/$sub")
done
done
mkdir -pv "${all[@]}"
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.