mac2unix

Change macOS-style line endings to Unix-style. Replaces CR with LF. More information: <https://waterlan.home.xs4all.nl/dos2unix.html>.

Install

All systems
curl cmd.cat/mac2unix.sh
Debian Debian
apt-get install dos2unix
Ubuntu
apt-get install dos2unix
Alpine
apk add dos2unix
Arch Arch Linux
pacman -S dos2unix
image/svg+xml Kali Linux
apt-get install dos2unix
CentOS
yum install dos2unix
Fedora
dnf install dos2unix
Windows (WSL2)
sudo apt-get update sudo apt-get install dos2unix
OS X
brew install dos2unix
Raspbian
apt-get install dos2unix
Docker
docker run cmd.cat/mac2unix mac2unix powered by Commando

Change macOS-style line endings to Unix-style. Replaces CR with LF. More information: <https://waterlan.home.xs4all.nl/dos2unix.html>.

  • Change the line endings of a file:
    mac2unix filename
  • Create a copy with Unix-style line endings:
    mac2unix -n filename new_filename

© tl;dr; authors and contributors