preda / gpuowl

GPU Mersenne primality test.
GNU General Public License v3.0
163 stars 39 forks source link

About adding newline to end of worktodo file #199

Closed valeriob01 closed 2 years ago

valeriob01 commented 4 years ago
# Command breakdown:
    # '.' denotes any character *except* newline
    # '$' denotes the end of file
    # 'a\' appends the following text (which is nothing, in this case) on a new line
    # In other words, if the last line contains a character that is not newline,
    # append a newline.

    sed -e '/.$/a\' "$@"
preda commented 2 years ago

thanks for the regexp.