• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

Dos2unix Alternative

July 2, 2021

If you create scripts in Windows, editors sometimes add a carriage return in addition to the line feed.

You can use dos2unix to remove the extra characters. Or you can use sed.

sed -i -e 's/\r$//' script.sh

sed -i -e 's/\r$//' script.sh

Filed Under: Linux Tagged With: carriage return, characters, dos2unix, extra, line feed

Search This Website

Subscribe Via Email

  • Home
  • About
  • Archives

Copyright © 2023