perl -pi -we '($_,$@)=($@,$_);$_.="New line\n"if eof' your_file [download]
In reply to Re: Replace Last Line in File by Abigail-II in thread search and replace last line by kevinw