I have one text file (fileA), approx 200 lines, each line with the format

```
afield1 afield2 afield3 afield4 afield5

```

and another text file (fileB), approx 300 lines, same format

```
bfield1 bfield2 bfield3 bfield4 bfield5

```

I want to create another text file, where if afield1 & bfield1 match, it writes a line like:

```
"some text" bfield4 "some text" afield3 "some text" afield1

```

I think this would be very easy to do in perl, or even awk, if I just knew how. a simple shell script is proving very difficult.

Very grateful for any help received.

Thanks