procmail
[Top] [All Lists]

Re: mkdir

2000-04-26 19:26:03
    # 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.

The w flag in the second probably doesn't do anything, it's only relevant
with f.

My guess :-)

Volker

<Prev in Thread] Current Thread [Next in Thread>
  • mkdir, Dallman Ross
    • Re: mkdir, Volker Kuhlmann <=