Hello,
I have got the following kine in my script
awk '{printf("%s,", $0);next}{printf("%s", $0)}' ORS="," a.txt > b.out
The contents of b looks somewaht like this:
QUEUE(QUEUE1.Q),CURDEPTH(0),QUEUE(QUEUE2.Q),CURDEPTH(0),QUEUE(QUEUE3.Q),CURDEPTH(0)
But my desired output is :
QUEUE(QUEUE1.Q),CURDEPTH(0),
QUEUE(QUEUE2.Q),CURDEPTH(0),
QUEUE(QUEUE3.Q),CURDEPTH(0)
Not good with this awk thing.
Any idea folks.
Thanks in advance.
Yep ... absolutely ...
But I would also like to say one more thing here ...
We have lines like this also in the input file ...
QUEUE(Queue5.Q) CURDEPTH(12)
QUEUE(Queue6.Q) CURDEPTH(11)
I have tried out a few options but the best that I am getting is
QUEUE(Queue1.Q),CURDEPTH(0),QUEUE(Queue2.Q),CURDEPTH(0),QUEUE(Queue3.Q),CURDEPTH(0),QUEUE(Queue5.Q), CURDEPTH(0),QUEUE(Queue6.Q), CURDEPTH(0)
Thanks a lot for ur time