Skip to content

Instantly share code, notes, and snippets.

@kitsuyui
Last active January 6, 2017 15:29
Show Gist options
  • Save kitsuyui/a7689533edab99c85b37d1d24887dd41 to your computer and use it in GitHub Desktop.
Save kitsuyui/a7689533edab99c85b37d1d24887dd41 to your computer and use it in GitHub Desktop.
UTF-8 な CSV を Excel が読めるように先頭 BOM をつけるシェルスクリプト ref: http://qiita.com/kitsuyui/items/6a963085b2fed496fa62
#!/usr/bin/env bash
printf '\xef\xbb\xbf'
exec cat
$ cat > ~/.bin/bomber << 'EOF'
#!/usr/bin/env bash
printf '\xef\xbb\xbf'
exec cat
EOF
$ chmod +x ~/.bin/bomber
$ bomber < example.before.utf8.csv > example.after.utf8.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment