LinuxCommandLibrary

eol

Line ending format detector and converter

TLDR

Check line endings in file
$ eol [file.txt]
copy
Convert to Unix line endings
$ eol -u [file.txt]
copy
Convert to Windows line endings
$ eol -d [file.txt]
copy
Convert to Mac classic endings
$ eol -m [file.txt]
copy
Process multiple files
$ eol -u [*.txt]
copy

SYNOPSIS

eol [options] files...

DESCRIPTION

eol detects and converts line ending formats in text files. It handles the three common conventions: Unix (LF), DOS/Windows (CRLF), and classic Mac (CR).
Without conversion options, eol reports the current line ending format of files. With conversion flags, it transforms files to the specified format in place.
The tool is useful for cross-platform development and fixing files with inconsistent or incorrect line endings.

PARAMETERS

FILES

Files to process.
-u, --unix
Convert to Unix (LF).
-d, --dos
Convert to DOS/Windows (CRLF).
-m, --mac
Convert to classic Mac (CR).
-q, --quiet
Quiet mode.
--help
Display help information.

CAVEATS

In-place conversion modifies files. Binary files may be corrupted. Mixed line endings may need multiple passes. Backup important files first.

HISTORY

eol is one of several line ending conversion tools, addressing the long-standing incompatibility between Unix, Windows, and classic Mac text file formats that dates back to early computing.

SEE ALSO

dos2unix(1), unix2dos(1), file(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard