#!/bin/sh # # timestampingly: run a command prefixing its (std)output with timestamps # # $Id$ if [ $# -eq 0 ] then echo $0: no arguments given >&2 exit -1 fi exec "$@" | { IFS=; export IFS; while read l; do echo `date +%F_%H:%M:%S.%N` "$l"; done; }