Make a Bourne Again Shell Script Log its Output to a File

The Bourne Again Shell script presented in this article demonstrates techniques related to capturing and logging output (standard output and standard error stream) of a script into a log file while also delivering it to the regular output destinations (for example the terminal or whatever the caller has chosen to redirect to). If you are […]

Using sed or awk to ensure a specific last Line in a Text

Given a file containing bytes of text with lines separated by the newline character (\n), one of these lines can be said to be “the last line of the file”; it is a sequence of bytes occurring in the file, for which holds: The sequence contains no newline character, and the sequence is followed by […]