stud/IV/filter-rivers-query.awk
Motiejus Jakštys d76584eee7 add Nemunas
2021-03-13 15:57:26 +02:00

13 lines
294 B
Awk
Executable File

#!/usr/bin/awk -f
BEGIN {
print "DROP TABLE IF EXISTS rivers;"
printf "CREATE TABLE rivers AS SELECT name,way FROM planet_osm_line WHERE "
for (i = 1; i < ARGC; i++) {
printf "name='%s'", ARGV[i]
if (i != ARGC - 1)
printf " OR ";
}
print ";";
}