diff options
author | Jonas Smedegaard <dr@jones.dk> | 2006-12-02 17:18:30 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2006-12-02 17:18:30 +0000 |
commit | 661f3bbcffa943757aa3edceca0907df86cc71ca (patch) | |
tree | 659724cb8770e0f9a7232b62a74be6ee81d329c1 | |
parent | a15ef1c30c080f62f2646aaffcb5e4310354f149 (diff) |
Run a command each second and dump output to the terminal screen.
-rwxr-xr-x | localloopdump | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/localloopdump b/localloopdump new file mode 100755 index 0000000..1de4054 --- /dev/null +++ b/localloopdump @@ -0,0 +1,20 @@ +#!/bin/sh +# +# /usr/local/bin/localloopdump +# Copyright 2006 Jonas Smedegaard <dr@jones.dk> +# +# $Id: localloopdump,v 1.1 2006-12-02 17:18:30 jonas Exp $ +# +# Endlessly loop of exec'ing a command and dumping its output to stdout +# +# TODO: Use getopts to make slepp time customizable +# + +set -e + +while test 1 = 1; do + output=$("$@") + clear + echo -n "$output" + sleep 1 +done |