This question already has an answer here:
- Edit file based on existence of a string 3 answers
I wish to use a single command line instead of opening the text editor to change the parameter of the file /etc/sysctl.d/10-magic-sysrq.conf to
kernel-sysrq = 1 from any current parameter, even if other lines are in that file.
Is there not something similar to a where?