Subject: Feature request: mktemp creates named pipes

From: Sebastien Andre <[email-masked]>
Date: Wed, 2 Jun 2010 12:08:34 +0200

Hello guys!

When needing a temporary named pipe in shell scripts, I've often been
writing the following function:

mktempfifo() {
    local path=$(mktemp -t)
    rm "$path"
    mkfifo -m 0600 "$path"
    echo "$path"
}

I was wondering if anybody would be interested in having an option -p --pipe
(or -f --fifo since -p is deprecated)
to create temporary named pipes?

Example:
   $ file $(mktemp -tp)
   /tmp/tmp.24665457: fifo (named pipe)

PS: I can try to provide a patch if my bug is accepted

Thanks,
Sebastien