Stop Nano from adding newline character to end-of-file

I use Nano for all of my cli text file editing and I had always noticed that it puts a newline at the bottom of the file, but this has never bothered me much. Well today it caused me quite a headache at work, so I had to figure out how to MAKE IT STOP.

My googling turned up this post at Ask Ubuntu. It has the answer for many linux editors, not just Nano.

The solution for Nano was simply to launch it with the -L option.
nano -L myfile.txt

Category(s): Googling for Answers, Linux
Tags: ,

Leave a Reply to Anonymous Cancel reply

Your email address will not be published.

* Copy this password:

* Type or paste password here: