elems.sh 809 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. ARG_1=`echo $QUERY_STRING | awk -F [=,\&] '{ print $1; }'`
  3. ARG_2=`echo $QUERY_STRING | awk -F [=,\&] '{ print $2; }'`
  4. ARG_3=`echo $QUERY_STRING | awk -F [=,\&] '{ print $3; }'`
  5. ARG_4=`echo $QUERY_STRING | awk -F [=,\&] '{ print $4; }'`
  6. ARG_5=`echo $QUERY_STRING | awk -F [=,\&] '{ print $5; }'`
  7. ARG_6=`echo $QUERY_STRING | awk -F [=,\&] '{ print $6; }'`
  8. ARG_7=`echo $QUERY_STRING | awk -F [=,\&] '{ print $7; }'`
  9. ARG_8=`echo $QUERY_STRING | awk -F [=,\&] '{ print $8; }'`
  10. REF=`date "+%s"`
  11. echo -e "\
  12. data=<osm-script timeout=\"180\" element-limit=\"10000000\"> \
  13. \
  14. <query type=\"$ARG_1\"> \
  15. <has-kv k=\"$ARG_2\" v=\"$ARG_3\"/> \
  16. </query> \
  17. <print mode=\"body\"/> \
  18. \
  19. </osm-script> \
  20. " >/tmp/req.$REF
  21. REQUEST_METHOD=
  22. /home/roland/osm-3s/cgi-bin/interpreter </tmp/req.$REF
  23. rm /tmp/req.$REF