Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 13th, 2013  |  syntax: None  |  size: 0.52 KB  |  views: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. $ cat /Resources/maps_sideScrolling/tileProperties.txt
  2. abc
  3. def
  4. ghi
  5.  
  6. $ cat /Resources/maps_sideScrolling/ruinsItemCave2.tmx
  7. pre
  8. stuff
  9. <tileset firstgid="1"
  10. foo
  11. bar
  12. <layer name="background"
  13. post
  14. stuff
  15.  
  16. $ awk '
  17. NR==FNR { s=s ORS $0; next }
  18. /<tileset firstgid="1"/    { print $0 s; f=1 }
  19. /<layer name="background"/ { f=0 }
  20. !f
  21. ' /Resources/maps_sideScrolling/tileProperties.txt /Resources/maps_sideScrolling/ruinsItemCave2.tmx
  22. pre
  23. stuff
  24. <tileset firstgid="1"
  25. abc
  26. def
  27. ghi
  28. <layer name="background"
  29. post
  30. stuff
clone this paste RAW Paste Data