#!/bin/sh iconv -f sjis -t eucjp test_encoding_sjis.txt > test_encoding_eucjp.txt iconv -f sjis -t utf-8 test_encoding_sjis.txt > test_encoding_utf8.txt iconv -f sjis -t ucs-2le test_encoding_sjis.txt > test_encoding_ucs2le.txt iconv -f sjis -t ucs-2be test_encoding_sjis.txt > test_encoding_ucs2be.txt perl -e 'print "\xfe\xff"' | \ cat - test_encoding_ucs2be.txt > test_encoding_ucs2be_bom.txt perl -e 'print "\xff\xfe"' | \ cat - test_encoding_ucs2le.txt > test_encoding_ucs2le_bom.txt perl -e 'print "\xef\xbb\xbf"' | \ cat - test_encoding_utf8.txt > test_encoding_utf8_bom.txt