Prefix The Output of Any Command with a Timestamp Gregg July 16, 2023 You can prefix the output of every line with a timestamp by piping the command to the following sed command: $ command | sed "s/^/\[date +"%Y%m%d%H%M%S"]/" Cli Sed Motd