From 6fae25b305d714b3ab7608fa003f1af9bf024545 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Tue, 14 Feb 2023 13:33:23 +0800 Subject: Rename tools into bin --- tools/osm/osm.osc.by_member | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100755 tools/osm/osm.osc.by_member (limited to 'tools/osm/osm.osc.by_member') diff --git a/tools/osm/osm.osc.by_member b/tools/osm/osm.osc.by_member deleted file mode 100755 index 5f9d9be..0000000 --- a/tools/osm/osm.osc.by_member +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -while read -r line -do - - TYPE=$(echo $line | cut -d ' ' -f1) # field1 is type - ID=$(echo $line | cut -d ' ' -f2) # field2 is ID - - NEW_MEMBERS=$(echo $line |\ - cut -d' ' -f3- |\ - sed -r 's/([0-9]+)//g') - - echo $NEW_MEMBERS - - # print matched element with new tags to .osc file - cat $1 |\ - sed -nr "/<$TYPE id=\"$ID\"/,/<\/$TYPE/ { - /<$TYPE id=\"$ID\"/ { - s/(version=\"[0-9]+\")(.*)/\1>/ - a \ \ \ \ $NEW_MEMBERS - } - p - /<\/$TYPE/ q - }" >> $1.osc -done - -# Add .osc structure for output -sed -ir '1 i - 1 i - $ a - $ a ' $1.osc -- cgit v1.2.3-70-g09d2