Skip to content

Instantly share code, notes, and snippets.

@thewoolleyman
Created August 22, 2010 03:07
Show Gist options
  • Save thewoolleyman/543227 to your computer and use it in GitHub Desktop.
Save thewoolleyman/543227 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
x=$'a\rb\nc\rd\r\n'
echo 1111111111
sed -n l <<< "$x"
y="$(tr -d $'\r' < <(echo \"$x\") )"
echo 2222222222
sed -n l <<< "$y"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment