gnu watch is a very useful tool for inspecting a program output: It executes the program and shows the output full-screen every 2 seconds.
Sometimes, I don't want the previous output to be erased, but rather be printed line by line with a time stamp. For that, I use bash scripts like:
while true;
do echo -n "`date` ";
ssh ubuntu@server -o ConnectTimeout=1 "uptime" ;
sleep 1;
done
Is there a watch-like tool that can run a command and display its output with a timestamp in a line without erasing previous output?