All pastes #421306 Raw Edit

Anonymous

public shellscript v1 · immutable
·published 2007-04-02 19:32 UTC
rendered paste body
#!/bin/bashfile_counter=0out="languages.txt"output_inc="./rewrited/"rm $output_inc/*.*rm $outfor file in $( ls inc/*.inc);dolet file_counter+=1in=`echo $file | sed -e 's/inc\///g'`out_inc="$output_inc/$in"counter=1echo "["$in"]" | sed -e 's/.inc//g'  >> $outdata=`cat $file | sed -e 's/[ \t]/_/g'`for datas in $data;do        data1=`echo $datas | grep -Ei 'SendPlayerScrollingText|format|SendClientMessage' | grep -v txt | grep -v logstring | awk -F '"' '{ print $2; }'`        if [  "${#data1}" -gt 3 ]; then                echo "$counter: $data1" | sed -e 's/_/ /g'  >> $out                kozepso="lang_texts["$file_counter"]["$counter"]"                echo $datas | sed -e 's/_/ /g' | awk -F '"' '{ print $1, var, $3; }' var=$kozepso >> $out_inc                let counter+=1        else                echo "$datas" |sed -e 's/_/ /g' >> $out_inc        fidoneecho -n "total text: $counter"doneecho -n "total files: $file_counter"