You should us some input and more details like is RMS and GAP will be on same line. After making an assumption like you have RMS as 12th field only and is on a different line with a single occurrence in whole file.
You can pass al file names to this command either by for loop or find command, depends on your conditions/requirements completely.
Let me know if you have any queries on same.
There is only one occurrence of both RMS and GAP in the file and both in fixed field locations.
Spacial thanks to RavinderSingh13
Following his advise I did something slightly different since I didn't want to modify the name of the file in the end.