I can comment out certain lines through vi in files. It is strenuous activity to do it in the 100's of files. Can I put a condition through sed or awk, for example, I want to put a condition as to comment out all the lines which have this client-ca-gh.ef.cd.1
and onwards.
The file has close to 500 lines, including 100 lines which include client1-100, which increases incrementally from 1 to 100. it is the same in all files, the only difference is that due to some spacing in the files, the line numbers do not match. For example, in one file client5 is on line 3 and in another one, it might be on 4. otherwise I would have used sed for all the files with line range
:3,5s/client/#client
1 client-ca-gh.ef.cd.1
2 client-ca-gh.ef.cd.2
3 #client-ca-gh.ef.cd.3
4 #client-ca-gh.ef.cd.4
5 #client-ca-gh.ef.cd.5
local-ip 0.0.0.0 site-client<number>
? – schrodingerscatcuriosity Feb 01 '21 at 20:50