Sorry about the n00b question but why is this an option? Is there any caveats to not ending a file with a line break?

  • This isn't a question about Apple hardware or software. You might try asking on Super User. – Nathan Greenstein Jul 27 '11 at 1:07
  • 1
    So asking a question about a Mac OS X only application is not valid here? It has to be strictly Apple? Really? – racl101 Jul 27 '11 at 1:10
  • Ok, well thanks Nathan for pointing me in the right direction. – racl101 Jul 27 '11 at 1:20
  • 1
    Questions about third-party software for Mac OS X are on-topic. I closed your question because I think it deals more with general computer behavior (text files) than with Macs specifically. But, your question does involve software for Mac OS X. So, I see your point. If you want, I'll reopen the question for you. Sorry for the confusion. – Nathan Greenstein Jul 27 '11 at 1:48
  • The reason for the option is buried in history, in old Unix programs which did not cope well with text files without a final newline. It's not unique to Mac OS, so the answers are probably better on another site, e.g. stackoverflow.com/questions/729692/… – Alan Shutko Dec 2 '14 at 16:33

This is probably because some other users of files require complete lines

e.g. C code will complain if there is no newline at the end of file - see this SO question

and one main use of Bbedit etc is programming

So the reason is not really specific to the Apple editors mentioned but more for what use the files is made of.

Also see the comment to that question

Not really the reason, but it's very annoying if you cat a file and it does not have a trailing newline as the new shell prompt will appear after the last line of the file (i.e. not in column 0)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .