source: misc/timestamp@ 332

Last change on this file since 332 was 287, checked in by Rick van der Zwet, 14 years ago

More ellegant and portable solution for the timestamp.

  • Property svn:executable set to *
File size: 138 bytes
Line 
1#!/bin/sh
2#
3# Prepend your (log) lines with a timestamp
4#
5PREFIX=${1-"[%H:%M:%S]"}
6while read line
7do
8 echo `date "+$PREFIX"` $line
9done
Note: See TracBrowser for help on using the repository browser.