public
Description: Hacked up shell script to grep in UTF-16 files
Homepage:
Clone URL: git://github.com/dacort/ugrep.git
ugrep / ugrep.sh
100755 8 lines (5 sloc) 0.185 kb
1
2
3
4
5
6
7
8
#!/bin/sh
 
GREP_FOR=$1
 
for file in `find . -type f | xargs -I {} file {} | grep UTF-16 | cut -f1 -d\:`
do iconv -f UTF-16 -t UTF-8 ${file} | grep -iH --label=${file} ${GREP_FOR}
done