HP3000-L Archives

June 2001, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mark Bixby <[log in to unmask]>
Reply To:
Mark Bixby <[log in to unmask]>
Date:
Thu, 28 Jun 2001 13:23:20 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
Mark Boyd wrote:
>
>   I need to build one or more directories on the fly; is there a way to tell
> mpe to build a posix directory if it doesn't exist?

In a shell script, you would probably do it like this:

if [ ! -d /some/dir/path ]; then
  mkdir /some/dir/path
fi

Or more concise but harder to read by the untrained eye:

[ ! -d foo ] && mkdir /some/dir/path

The expression inside the square brackets is a "test" expression.  See "man
test" for details.
--
[log in to unmask]
Remainder of .sig suppressed to conserve scarce California electrons...

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2