**I have text lines like these below:**

```
P,   123456  ,01,A,H, 123456 ,123456 123456 ,,
P,123456   ,01,A,H, 123456,   123456 123456,,
P,  123456,01,A,H,123456 ,123456 123456 ,,
P, 123456,01,A,H,   123456,  123456 123456,,
P,123456 ,01,A,H,123456   ,123456 123456  ,,

```

**I want them to be like below:**

```
P,123456,01,A,H,123456,123456 123456,,
P,123456,01,A,H,123456,123456 123456,,
P,123456,01,A,H,123456,123456 123456,,
P,123456,01,A,H,123456,123456 123456,,
P,123456,01,A,H,123456,123456 123456,,

```

**Requirements:**

1. Remove all leading & trailing spaces from 2,6,7 column only
2. Values in 7th Column should remain separated by single space only

**Research:**

I have tried many combinations with `awk`, `sed`, `tr` but could not succeed according to my requirements. I would like to have a preferable solution in `awk`, `sed`, `tr` only because all my clients have limited CYGWIN installed. So I cannot ask all my clients to install new executable.