FS in awk

Hi,
I have a situation where ihave to group the data and put it in the third file.

for eg:
a.txt
Name:[John]
Age:[26]
Sex:[M]
Name:[Fred]
Age:[28]
Sex:[M]

For the file above i need a output as
b.txt
John-26-M
Fred-28-M

the problem is when i use awk i dont know how to select '[' as delimter and in the output it is not delimiting according to John-26-M format using OFS. Any approach is ok other than awk.

Thanks

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

Proceed here:

http://www.unix.com/shell-programming-scripting/116628-copying-other-files.html

The UNIX and Linux Forums.