SeaJelly
SeaJelly

Reputation: 1746

Append Newlines to All Files in a Directory in Linux

I have a project in Visual Studio that can build and run successfully. I need to make it work in Linux. One problem is that the newline character is different from that in Linux, thus I'm getting tons of warnings saying that "no newline at end of file". Appending newline characters to all files one after another is tedious, I'm wondering whether there is a Linux command that I can use to perform the same operation (here, the operation is append newline to end of file) to all files in a directory in Linux?

Thanks in advance!

-Leonora

Upvotes: 1

Views: 912

Answers (1)

Gereon
Gereon

Reputation: 17864

Most linuxes have a dos2unix command that helps with file conversions.

Upvotes: 1

Related Questions