Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    I just tried this and it appears that sed only runs the command once and thus all the lines go with the same time Commented Mar 1, 2022 at 8:35
  • Yeah, that shell command interpolation is only going to be run once before sed starts. You can use the e command in GNU sed to actually execute the date command for every line of the file. See my answer: stackoverflow.com/a/73723738/229247 Commented Sep 14, 2022 at 22:19