bash version of collector, still missing XML generator