From 00b136155183ae522ca458e540a8cf29bf525e74 Mon Sep 17 00:00:00 2001 From: typebrook Date: Thu, 27 Feb 2020 16:32:37 +0800 Subject: update --- scripts/osm/osm.osc.by_member | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100755 scripts/osm/osm.osc.by_member (limited to 'scripts/osm/osm.osc.by_member') diff --git a/scripts/osm/osm.osc.by_member b/scripts/osm/osm.osc.by_member deleted file mode 100755 index 5f9d9be..0000000 --- a/scripts/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