track.sh 215 B

1234567891011121314
  1. #!/bin/bash
  2. #
  3. # Use like:
  4. # ./track.sh [source] [target] [log-interval]
  5. #
  6. # For example
  7. # ./track.sh source.txt target.log 4
  8. #
  9. while true;
  10. do
  11. echo "================" >> $2;
  12. cat $1 >> $2;
  13. sleep $3s;
  14. done