Skip to content

Instantly share code, notes, and snippets.

@Himura2la
Created July 8, 2020 07:27
Show Gist options
  • Save Himura2la/3ab71dca4a0bb79d9b4ff946a0dd2189 to your computer and use it in GitHub Desktop.
Save Himura2la/3ab71dca4a0bb79d9b4ff946a0dd2189 to your computer and use it in GitHub Desktop.
dos2unix with find and sed
find . -type f -regex '.*\.\(yml\|json\)$' -exec sed -i $'s/\r$//' '{}' \; -exec echo "Line endings changed to LF in {}" \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment