on some of my machines i have this block of setting in sysctl.conf(the numbers are different on each machine) :
#Size Of RAM (In GB): 23 kernel.shmmni= 2547 kernel.shmmax= 365482458 kernel.shmall= 25471984 #kernel.sem=<SEMMSL> <SEMMNS> <SEMOPM> <SEMMNI> kernel.sem= 325 12496852 74 3654 kernel.msgmni= 1204 kernel.msgmax= 57452 kernel.msgmnb= 74235
the location of this block is different sometimes. i wanted to write a bash that remove this old settings and insert new configuration. since it is sysctl.conf i need to do it safely. how i can remove them with
grep and be sure that only this block will remove?