Browse Subversion Repository
Contents of /misc/data/dictgen.sh
Parent Directory
| Revision Log
Revision 114 -
( show annotations)
( download)
( as text)
Mon Apr 21 01:56:41 2008 UTC
(15 years, 11 months ago)
by mir
File MIME type: text/x-sh
File size: 443 byte(s)
Added ramdom Japanese data generator.
| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
TMP=workdir |
| 4 |
|
| 5 |
rm -rf $TMP |
| 6 |
mkdir $TMP |
| 7 |
|
| 8 |
find -name "*\.csv" | sed -e "s/\.\///g" > $TMP/dict_file.txt |
| 9 |
|
| 10 |
while read LINE |
| 11 |
do |
| 12 |
# fname=`echo $LINE | sed -e "s/\.\///g"` |
| 13 |
fname=$LINE |
| 14 |
awk -F, '{print $1}' $fname > $TMP/$fname |
| 15 |
wc -l $TMP/$fname | awk '{print $1}' >> $TMP/dict_row_num.txt |
| 16 |
done < $TMP/dict_file.txt |
| 17 |
|
| 18 |
#SUM=0 |
| 19 |
#while read LINE |
| 20 |
#do |
| 21 |
# SUM=`expr $SUM + $LINE` |
| 22 |
#done < $TMP/dict_row_num.txt |
| 23 |
#SUM=`expr $SUM * 128` |
| 24 |
#echo $SUM |
|