From 661f3bbcffa943757aa3edceca0907df86cc71ca Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 2 Dec 2006 17:18:30 +0000 Subject: Run a command each second and dump output to the terminal screen. --- localloopdump | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 localloopdump (limited to 'localloopdump') 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 +# +# $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 -- cgit v1.2.3