Install dos2unix by entering the following commands in the terminal:
sudo apt update sudo apt install dos2unix
convert text file line endings between CRLF and LF
This package contains utilities dos2unix, unix2dos, mac2unix, unix2mac to convert the line endings of text files between UNIX (LF), DOS (CRLF) and Mac (CR) formats. . Text files under Windows and DOS typically have two ASCII characters at the end of each line: CR (carriage return) followed by LF (line feed). Older Macs used just CR, while UNIX uses just LF. While most modern editors can read all these formats, there may still be a need to convert files between them. . This is the classic utility developed in 1989.