Perhaps I'm reading too much in to it, but it seems that you want the same data two different ways. If this is the case, modify your original script to output two streams while it's already ripped apart. You'll save yourself time and a headache.
thor