When executing the following line in bash:
set -e
p=$(mktemp -t "${1}.$$.XX")
mktemp not working with this message:
+++ mktemp -t cpfs.c.o.5643.XX
mktemp: too few X in template `cpfs.c.o.5643.XX'
How can I get a failure error to enable errors during command replacement? Alternatively, how can I spread the mktemp return form back so that set -e, or my own code can impact the result?
source
share