At 14:17 +1200 27 Apr 2000, Volker Kuhlmann
<kuhlmav(_at_)elec(_dot_)canterbury(_dot_)ac(_dot_)nz> wrote:
# Most efficient way to test & mkdir
:0 ihc
* ! ? test -d $DIR
|mkdir -p $DIR
:0 wic # if needed, create today's ackdir; add sender
* $ ! TESTNAME ?? ^^$ACKS/fullacks/
| test -d $ACKS/$DATE || mkdir $ACKS/$DATE ;\
I'd say the efficiency is the same. Both versions run the external
program test, and mkdir if the test fails.
Not true. The second way runs a shell which then runs the commands.
The first way runs the commands directly, so there's one less process
used.
--
Aaron Schrab aaron(_at_)schrab(_dot_)com http://www.execpc.com/~aarons/
The only disadvantage I see is that it would force everyone to
get Perl. Horrors. :-) --Larry Wall