<<< Date Index >>>     <<< Thread Index >>>

Re: User's inbox



Am 2008-07-14 10:14:32, schrieb Patrick Shanahan:
<snip>
> TMPDIR=${TMPDIR-/tmp}
<snip>
> TMPFILE="${TMPDIR}/grepmail-output.$$"
<snip>
> if [ -f ${TMPFILE} -o -d ${TMPFILE} -o -w ${TMPFILE} ]; then
>   echo 1>&2 "Temporary file ${TMPFILE} exists for some reason! Aborting."
>   exit 1
> fi

Why not use:

   TMPFILE=`mktemp -t ${PROGNAME}.XXXXXX || exit 1`

It is much shorter and "-t" respect ${TMPDIR} if exist.

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature