From owner-freebsd-questions@FreeBSD.ORG Wed Mar 23 21:25:15 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDE9B1065672 for ; Wed, 23 Mar 2011 21:25:15 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout030.mac.com (asmtpout030.mac.com [17.148.16.105]) by mx1.freebsd.org (Postfix) with ESMTP id D2B688FC08 for ; Wed, 23 Mar 2011 21:25:15 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from cswiger1.apple.com ([17.209.4.71]) by asmtp030.mac.com (Oracle Communications Messaging Exchange Server 7u4-20.01 64bit (built Nov 21 2010)) with ESMTPSA id <0LIJ00B7A4T70160@asmtp030.mac.com> for freebsd-questions@freebsd.org; Wed, 23 Mar 2011 14:24:44 -0700 (PDT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15,1.0.148,0.0.0000 definitions=2011-03-23_08:2011-03-23, 2011-03-23, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1103230126 From: Chuck Swiger In-reply-to: <20110323222143.d155ada6.freebsd@edvax.de> Date: Wed, 23 Mar 2011 14:24:43 -0700 Message-id: <1ACB836D-CDF9-490D-A27D-C23B8F8167D8@mac.com> References: <21012F71-5038-45F1-98C6-72A0B1239009@d3photography.com> <31D3BED1-7035-435F-B127-EFAAF6AFF076@mac.com> <20D9B390-3190-4865-A19E-BDEDC595E7A2@d3photography.com> <6120FA66-E11C-4DFD-BF34-915807B3DA2B@mac.com> <20110323222143.d155ada6.freebsd@edvax.de> To: Polytropon X-Mailer: Apple Mail (2.1084) Cc: Ryan Coleman , FreeBSD Mailing List Subject: Re: Automating mounting of ISO images X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 21:25:16 -0000 On Mar 23, 2011, at 2:21 PM, Polytropon wrote: > Prefix it with a test: > > [ -d /mount/office_files/images/${DEST} ] && mkdir... > mount... > > so there will be no error if the script is started for the > second time (and the directories still exist), means: create > them only if not yet present. While I agree with this suggested change from the perspective of only doing work if you actually need to do it, note that "mkdir -p" doesn't return an error if the directory already exists. :-) Regards, -- -Chuck