#! /bin/sh # $1 as [node|way|relation], $2 as id echo "" sed -nr "/^ *<$1 id=\"$2\".*/,/^ *<\/$1>/p" echo ""