2
I use the following perl one line in order to append WORD in the end of the last line in the file
perl -p -i -e 's/$/WORD/;' file
But it's append the WORD in every line -
How to fix the perl syntax in order to append the WORD only on the last line in the file
example
more file
AAAAA BBB
WWWWW
EEEEE WORD