How to solve this

I have to write an script for..

CUST: 123 trans:

some contents

CUST: 1234 trans:
some contents

Now wat i have to do is this:
CUST:123 akash trans:
some contents
CUST:1234 akash1 trans:

I have been able to add name to the number but the format is getting changed like:
CUST:123 akash trans:
some contents

CUST:1234 akash1 trans:

I want to retain the format..... i have used the sed to add names to the numbers and it is shifting the spaces between number and "TRANS" so the format gets changed.I want to keep the format same after adding names to the numbers...

Pleae provide me the solution..

use printf command with awk.

can you give me an idea how i should use that.. acutally there are some content between two line named CUST..

try this:

cat file_name |grep "CUST" | awk '{print $1 " AKASH " $3}'