#!/bin/sh
# command | bash time-stramp.sh
if [ $# -gt 0 ];then
  exec 0<$1;
fi

while read line
do
    echo `date "+%Y-%m-%d %H:%M:%S"`  $line;
done<&0;