Read file contents and separate the lines when completes with =

Hi,

I have a file like this

cpsSystemNotifyTrap='2010/12/14 11:05:31 CST' Manufacturer=IBM ReportingMTMS=n/a ProbNm=26 LparName=n/a FailingEnclosureMTMS=7946-IQL*99G4874 SRC=B3031107 EventText=Problem reported by customer. CallHome=true Calendar

I want to have a output like this

cpsSystemNotifyTrap='2010/12/14 11:05:31 CST' 
Manufacturer=IBM 
ReportingMTMS=n/a
ProbNm=26 
LparName=n/a
FailingEnclosureMTMS=7946-IQL*99G4874 
SRC=B3031107 EventText=Problem reported by customer.
CallHome=true Calendar

Any code how to do it with awk or sed. or any other alternative?

Regards,
Dinesh

---------- Post updated at 05:39 PM ---------- Previous update was at 05:08 PM ----------

I copied one of the solution given in this forum but does not seems to work

#!/usr/bin/sh
set -x
while IFS='&' read -a L
do
for i in ${!L[@]}; do
eval "${L[$i]}"
done
for V in cpsSystemNotifyTrap Manufacturer ReportingMTMS ProbNm LparName FailingEnclosureMTMS SRC EventText CallHome
do
echo -en "$V=${!V}\t"
done
echo
done < /opt/Tivoli/custom/bin/trap.txt

Try

perl -n -e '@val = split(/(\w+)=/);foreach ( @val ) {if ( $_) {if ($i && $_) {print $val."=".$_ ."\n";$i=0 }else {$val=$_;$i++;}}}' infile

Another Perl:

perl -anF"=" -e '$\="=";for (@F){s/ ([^ ]+)$/\n$1/;print}' file

Another one:

awk '{
  printf $1
  for(i=2;i<=NF;i++) {printf("%s%s",$i ~ /=/?RS:FS,$i)}
  printf RS
}' file
 
sed '/s\( [a-zA-Z][a-zA-Z0-9]*\)=/FSXXXX\1=/g' /opt/Tivoli/custom/bin/trap.txt | awk -F "FSXXXX " 'BEGIN{OFS="\n";}{for(i=1;i<=NF;i++)print $i;}'
sed 's/\([[:graph:]]*=\)/\n\1/g' infile
sed 's/[^= \t]*=/\n&/g' file