Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 1380 → Rev 1381

/asterisk-stats/trunk/import/panasonic.sh
0,0 → 1,6
# persons
cat panasonic.txt | awk "BEGIN {FS=\",\"} \$0 \!~ \"^;\" { n=substr(\$1, 2, length(\$1)-2); i=index(n, \"/\"); if(i > 0) { t=substr(n, i+1); n=substr(n, 1, i-1); } printf(\"insert into telbook_persons (person_name,person_category) select '%s', category_id from telbook_categories where category_export_key=%s;\\n\", n, \$2); }"
 
# entries
cat panasonic.txt | awk "BEGIN {FS=\",\"} \$0 \!~ \"^;\" { n=substr(\$1, 2, length(\$1)-2); i=index(n, \"/\"); if(i > 0) { t=substr(n, i+1); n=substr(n, 1, i-1); } printf(\"insert into telbook_entries (entry_value,entry_title,entry_person) select '%s', '%s', person_id from telbook_persons where person_name='%s';\\n\", \$3, t, n); }"