Permalink
Browse files

Get a proper temporary file in editlog

  • Loading branch information...
1 parent 640cb42 commit c37cb1ab2f910d5e4e0cdf7e28911d99bd0bcc61 Bart Spaans committed May 23, 2010
Showing with 4 additions and 3 deletions.
  1. +4 −3 scripts/editlog
View
@@ -46,11 +46,12 @@ if [ "$cmd" == "" ] ; then
exit 1
fi
-cat > tmp.session << EOF
+t="$(tempfile)"
+cat > "$t" << EOF
$cmd
quit
EOF
-cat tmp.session | telnet $host $port >& /dev/null
+cat "$t" | telnet $host $port >& /dev/null
-rm tmp.session
+rm "$t"

0 comments on commit c37cb1a

Please sign in to comment.