Browse Source

Scipt to log a file.

Marcelo Fornet 5 years ago
commit
99cc0cb09d
1 changed files with 14 additions and 0 deletions
  1. 14 0
      track.sh

+ 14 - 0
track.sh

@@ -0,0 +1,14 @@
+#!/bin/bash
+#
+# Use like:
+# ./track.sh [source] [target] [log-interval]
+#
+# For example
+# ./track.sh source.txt target.log 4
+#
+while true;
+do
+    echo "================" >> $2;
+    cat $1 >> $2;
+    sleep $3s;
+done