Created
October 4, 2012 10:26
-
-
Save uzzu/3832770 to your computer and use it in GitHub Desktop.
ファイル中のASCII文字以外の文字を消す ref: http://qiita.com/items/fd0b89955d18fb21a3ae
This file contains 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
#!/bin/sh | |
usage() { | |
echo Usage: $0 [OPTIONS] DIRECTORY FILEPATTERN | |
echo; | |
echo "\t\tOPTIONS equivalent to OPTIONS of sed" | |
} | |
case "$#" in | |
2) find $1 -name $2 | xargs sed -e 's/[^\x00-\x7E]//g' | less;; | |
3) find $2 -name $3 | xargs sed $1 's/[^\x00-\x7E]//g';; | |
*) usage;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment