timestamper

A tiny tool that adds timestamp prefix to each piped line.

Timestamper

A tiny tool that adds timestamp prefix to each piped line.

npm install -g timestamper
$ ./slow.sh
This
is
slow

$ ./slow.sh | ts
[2012-05-30 18:45:45]: This
[2012-05-30 18:45:46]: is
[2012-05-30 18:45:47]: slow

$ cat ./slow.sh
#!/usr/bin/env bash
echo "This"
sleep 1
echo "is"
sleep 1
echo "slow"