print the fileds of a file

Hi Friends,
Please help me in finding the solution for this :

I have a file as below :

CuDv:
name = "hdisk0"
status = 1
chgstatus = 2
ddins = "scsidisk"
location = ""
parent = "vscsi0"
connwhere = "830000000000"
PdDvLn = "disk/vscsi/vdisk"

CuDv:
name = "hdisk1"
status = 1
chgstatus = 2
ddins = "scsidisk"
location = ""
parent = "ent0"
connwhere = "850000000000"
PdDvLn = "disk/vscsi/vdisk"
CuDv:
name = "lvdd"
status = 1
chgstatus = 1
ddins = "hd_pin"
location = ""
parent = ""
connwhere = ""
PdDvLn = "lvm/lvm/lvdd"

------------------------------------
I need to figure out if there is any way that i can print the o/p as below (Disk name followed by the Parent field, the disk name has to be hdisk*):

hdisk0 : vscsi0
hdisk1 : ent0

Thanks in advance,
vijaya2006

Try:

awk '/hdisk/{n=$2;i=1}/parent/&&i{print n" : "$2;i=0}' FS='"' file

Using Sed,

sed -ne 's/name = \("*"\)/\1/p' -ne 's/parent = \("*"\)/\1/p' /tmp/YourInput | sed '1~2 {N;s/\n/:/g}'

Thanks
Nagarajan G

hey try this out,

awk -F"=" '/name/ {n=$2} /parent/ {print n" = " $2}' <<filename>>