How can I add a percentage symbol % to the end of the last line in a text file?
I do not want the % to be on a new line, it must be at the end of the last line.
Thanks!
sed '${s/$/%/}' file
来源:https://stackoverflow.com/questions/3657860/bash-append-text-to-last-line-of-file