Lets call the lines with % queues so AAA_AA1_DDD has two sets of queues seperated by the pipe as do every other line save the lines that show a "BS:". In this example AAA_AA1_DDD belongs to BS: 111_DDD displayed 2 lines below it and CCC_CC2_DDD belongs to BS: 333_DDD. Unfortunately the output would have be nicer if it were reversed because I can check for a BS line mark is and add what the BS owns in a hash of arrays with the important values % and # of both queues. Something like:Output I am required to process: AAA_AA1_DDD (0% / 0 of 1024 | event 0% / 0 of 1024) AAA_AA2_DDD (0% / 0 of 1024 | event 0% / 0 of 1024) BS: 111_DDD, QE: QQQ_DDD (additionnal QE) BBB_BB1_DDD (0% / 0 of 1024 | event 0% / 0 of 1024) BBB_BB2_DDD (0% / 0 of 1024 | event 0% / 0 of 1024) BS: 222_DDD, QE: QQQ_DDD (additionnal QE) CCC_CC1_DDD (0% / 0 of 1024 | event 0% / 0 of 1024) CCC_CC2_DDD (0% / 0 of 1024 | event 0% / 0 of 1024) BS: 333_DDD, QE: QQQ_DDD (additionnal QE)
Why do I want to do this, well I think it would be the easiest way to populate a mysqldbBS 111_DDD => (AAA_AA1_DDD,%,#,%,#)
I thought of one way to do this 1) Put the output into an array and reverse the array to make it easier to process so the lines would look like this:table queue BS queue_name in_q_per in_q_num out_q_per out_q_num ------------------------------------------------------------ 111_DDD AAA_AA1_DDD 0% 0 0% 0 111_DDD AAA_AA2_DDD 0% 0 0% 0 222_DDD BBB_BB1_DDD 0% 0 0% 0 222_DDD BBB_BB1_DDD 0% 0 0% 0 333_DDD CCC_CC1_DDD 0% 0 0% 0 333_DDD CCC_CC1_DDD 0% 0 0% 0
Please help me (with code examples if possible) decide a plan for this.BS: 333_DDD, QE: QQQ_DDD (additionnal QE) CCC_CC2_DDD (0% / 0 of 1024 | event 0% / 0 of 1024) CCC_CC1_DDD (0% / 0 of 1024 | event 0% / 0 of 1024) BS: 222_DDD, QE: QQQ_DDD (additionnal QE) BBB_BB2_DDD (0% / 0 of 1024 | event 0% / 0 of 1024) BBB_BB1_DDD (0% / 0 of 1024 | event 0% / 0 of 1024) BS: 111_DDD, QE: QQQ_DDD (additionnal QE) AAA_AA2_DDD (0% / 0 of 1024 | event 0% / 0 of 1024) AAA_AA1_DDD (0% / 0 of 1024 | event 0% / 0 of 1024)
In reply to Plan of Attack. by NothingInCommon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |