Last active
January 6, 2017 15:29
-
-
Save kitsuyui/a7689533edab99c85b37d1d24887dd41 to your computer and use it in GitHub Desktop.
UTF-8 な CSV を Excel が読めるように先頭 BOM をつけるシェルスクリプト ref: http://qiita.com/kitsuyui/items/6a963085b2fed496fa62
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
printf '\xef\xbb\xbf' | |
exec cat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat > ~/.bin/bomber << 'EOF' | |
#!/usr/bin/env bash | |
printf '\xef\xbb\xbf' | |
exec cat | |
EOF | |
$ chmod +x ~/.bin/bomber |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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