shell script required to convert rows to columns

Hi Friends,

I have a log file as below

siteid = HYD
spc = 100
rset = RS_D_M
siteid = DEL
spc = 200
rset = RS_K_L
siteid = DEL2
spc = 210
rset = RS_D_M

Now I need a output like column wise as below.

siteid SPC rset
HYD 100 RS_D_M
DEL 200 RS_K_L

Can anybody help me.

Suresh

Check this post may help you

cat filename  | sed 's/ //g' | nawk 'BEGIN{FS="=";n=1}
{
if($1!="rset")
	a[n$1]=$2
else
{
	a[n$1]=$2
	n=n+1
}
}
END{
print "siteid    spc   rset"
for(i=1;i<=n;i++)
{
	t=sprintf("%ssiteid",i)
	t1=sprintf("%sspc",i)
	t2=sprintf("%srset",i)
	print a[t]"    "a[t1]"   "a[t2]
}
}'