I have a configuration file in the following format.

```
<Title>
 [part1]
  A.File = a
  A.Val = val1
  B.File = a
  B.Val = val1
 [part2]
  A.File = a1
  A.Val = val2 
  B.File = a
  B.Val = val1

```

I want to extract values from first part only.

```
 #!/bin/sh 
getCalibDate()
{
 file="/path/of/config/file"
 value=`cat ${file} | grep Val | cut -d'=' -f2`
    for v in $value
    do
            echo $v
    done
}
getCalibDate

```

Above script will return all the values.
How can I get values from only first part (part1) ?