I have a stream of data I'm receiving on stdin and I would like to add timestamps onto the steam. Ideally every line I would like to replace the new line with the current epoch seconds
... | sed "s/$/$(date +' %s')"/
won't work because it will just evaluate the date command once on command.
What can I do?