Add a trailing & to that line.
I need help creating a sed script that counts trailing white spaces with the sed command.
I can count the the words in a line by using sed -n '$=' but how would I do that for spaces and trailing spaces?
New to bash so I appreciate any help I can get,
I have to use sed for this so what If I just want to just print the lines (with trailing white spaces) instead of counting them?
I have been trying to remove empty lines and lines just filled with spaces. I have used the following command which does work.
sed -i "/^\s*$/d"
Except it leaves one single trailing line at the very end of the file. For the life of me I cant figure out why I cant remove that last trailing line.