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.

Required fields*

8
  • When this was published I was under GNU/Linux Debian 6, but this work quite same under Debian 7... Commented Jan 29, 2014 at 16:55
  • This is linked to Record bash_history to private database for all users Commented May 9, 2014 at 12:03
  • Upgraded due to change in log format Commented Oct 31, 2016 at 16:18
  • 1
    @AlexNorth-Keys extensions under UN*X are generaly technicaly unseless, as we prefer use mime and file for knowing file types. But as for human who browse filesystems, having extensions like .pl, .py, .sh, .awk, .sed, .tar.gz, or even .png.b64.gz is usefull! Commented Nov 3, 2017 at 8:33
  • 1
    @kos command h will store current pattern space into hold space. g command get hold space into current pattern space, and x command will exchange content of hold space with content of current pattern space. See info sed. In this use case, I wait upto last line to ensure job done, or adding one more line. Commented Mar 25, 2022 at 5:35