aboutsummaryrefslogtreecommitdiff
path: root/ep
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2020-11-24 21:00:29 +0100
committerJohn Ankarström <john@ankarstrom.se>2020-11-24 21:04:12 +0100
commit0d0d8d994603a740446085c6ba096642acaf50d4 (patch)
treeb643e8b5f95c95d681247bd90368eb4b29298005 /ep
parenta5bfba21215bf9d8e63292b4c75985894e169f4c (diff)
downloadxutil-0d0d8d994603a740446085c6ba096642acaf50d4.tar.gz
ep: Use mktemp instead of $RANDOM
$RANDOM is (unfortunately) not POSIX, and mktemp is safer permission-wise.
Diffstat (limited to 'ep')
-rw-r--r--ep2
1 files changed, 1 insertions, 1 deletions
diff --git a/ep b/ep
index 3fb8a0d..4be6317 100644
--- a/ep
+++ b/ep
@@ -2,7 +2,7 @@
# ep -- edit pipe
-tmp=/tmp/ep.$RANDOM
+tmp=`mktemp /tmp/ep.XXXXXX`
cat > $tmp
${EDITOR:-vi} $tmp < /dev/tty > /dev/tty
cat $tmp