I have a comma delimited file like below

```
0,category=a,type=b,value=1
1,category=c,type=b,.....,original_value=0
2,category=b,type=c,....,original_value=1,....,corrected_value=3

```

A line in the file can contain
(1)only 'value'
(2)only 'original\_value' 
(3)both 'original value' and 'corrected\_value'

The values can be in any column.

The following awk command I wrote can only print one field after pattern match. 

```
cat file | awk -F, 'BEGIN{OFS=","} /value/ { for (x=1;x<=NF;x++) if ($x~"value") {print $2,$3,$(x)} }' | sort -u

```

**Current Output**:

```
category=a,type=b,value=1
category=b,type=c,corrected_value=3
category=b,type=c,original_value=1
category=c,type=b,original_value=0

```

How do I print two fields (columns) of a line if two pattern matches occur? In this case, if both original\_value and corrected\_value exist.

**Expected Output**:

```
category=a,type=b,value=1
category=b,type=c,original_value=1,corrected_value=3
category=c,type=b,original_value=0

```

Bash Version: 4.3.11