Originally Posted by raja219
Please do the needful by providing the command which gives this result.
Did you try something yourself? If yes, let's know. IMHO, do not expect a ready-made solution from LQ.
Meanwhile, in addition to perl, awk
could do this, if you have ever tried.