Hi. This is just a short post; but I am still alive! :) I have recently cleaned up my neovim config, and I had the requirement for a script which cleans trailing whitespace. I have come up with some cool `sed` stuff. Here is my short script:

trimws.sh
``````#!/bin/sh

sed '
:a
/^\n*$/ {$d
N
ba
}

s/[[:space:]]\+$// '$@``````