Linux bash script to add a line in a config file
I'm having trouble thinking of how to add a line to a config file and keep the same syntax. I know how to add a line to the bottom of a file using a script but not somewhere in the middle for example my config will look something like this:
"config:
2nd line
3rd line
4th line
5th line"
How would a command/script look like to be able to add another line between 3rd line and 4th line with same formation? Thank you all for your time and help.
|