View Single Post
Old 17th June 2019
TheTKS TheTKS is offline
Port Guard
Join Date: Sep 2018
Location: Canada
Posts: 24

Originally Posted by johnR View Post
I don't normally use nano but I just installed it to test this. The only way I could get it to leave out the newline at the end was to start it with the -L option (--nonewlines). If saving to a .txt file, it didn't leave it out even with the -L option.

I guess it's possible if launching nano from a gui icon in a desktop environment (not something I use) it might behave differently.
I do normally use nano, from the CLI, and it behaves for me the way described in the thread jggimi linked to - I'm one of the posters who was puzzled with the strange results using nano, until I learned in that thread what was going on. I still use nano, but always check to make sure my files have the final newline.

With that said, I have used vi, vim and others, but never enough to get the hang of them. I will use vi a bit more to get handy with a second editor. Looking over that tutorial, it looks like it should take less than I expected to get there. Thanks for that, jggimi!

Reply With Quote