Need help to parse the file

# Start
"ABC" SFFd 0 4 [abc]
Time SFFT 4 8 {Sec} [abc]
User SFFTimeVal 12 8 {Sec} [asd]

# Start
"CP" SFFT (Time") {Sec} [fgh]
Time" SFFT ("Utn") {Sec} [jhk]

I have bundle of file in above format. please help me to create a shell script that will take input of file name and output will be like this.

ABC,SFFd
Time,SFFT,sec
User,SFFTimeVal,sec
CP,SFFT,sec
Time,SFFT,sec

I don't want to add those row which is commented with # sign

Thanks in Advance.

This may help get you started:

BEFORE:
cat file-1.txt
# Start
"ABC" SFFd 0 4 [abc]
Time SFFT 4 8 {Sec} [abc]
User SFFTimeVal 12 8 {Sec} [asd]

AFTER:
cat file-1.txt | grep -v ^# | sed -e 's/"//g' | awk '{print $1","$2",sec"}'
ABC,SFFd,sec
Time,SFFT,sec
User,SFFTimeVal,sec

Alternatively, in Perl:

#!/usr/bin/perl

while(<>) {
chomp;
s/^\#.//g;
s/"//g;
s/{|}//g;
s/\(.
\)//g;
s/\[.\]//g;
s/\d
//g;
s/Sec/sec/g;
s/\s+/,/g;
s/^\s+$//g;
chop;
print "$_\n" unless(/^$/);
}

Run as 'parsefile.pl file.txt'

Thanks,
I will try it.