sed -rni '/<tileset\s+firstgid="1"/ {
s/(\s*\<tileset\s+firstgid\=\"1\").*/\1/p
r /Resources/maps_sideScrolling/tileProperties.tmx
:loop
n
s/.*<layer name="background".*/&/p
t
b loop
}' ~/Resources/maps_sideScrolling/*.tmx;


Mibbit.com Pasted on 2013-02-06 17:51:36