瀏覽代碼

Remove tmpfile

George Jones 3 年之前
父節點
當前提交
46bad6bc03
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      some

+ 1 - 1
some

@@ -60,7 +60,7 @@ function someFunc {
     # display line numbers to stderr to allow re-extraction of randomly chosen lines
     echo some: lines $FIRST to $LAST \(of $LINES\) of $FILE |& tee /dev/stderr >> ${SOMELOG}
     # only keep MAXLOG lines of SOMELOG
-    mv ${SOMELOG} ${SOMELOG}.$$ && tail -${MAXLOG} ${SOMELOG}.$$ > ${SOMELOG}
+    mv ${SOMELOG} ${SOMELOG}.$$ && tail -${MAXLOG} ${SOMELOG}.$$ > ${SOMELOG} && rm ${SOMELOG}.$$