I am trying to program a bash script to make some substitutions in a configuration file.
The conf test file is like this:
pm.max_children = 50
bla bla bla pm.max_children
pm.start_servers = 10
pm.min_spare_servers = 10
pm.max_spare_servers = 30
;pm.max_requests = 20000
The substitutions I need to make are:
pm.max_children = 5
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.max_requests = 2000
I need to run this program from a bash script.
Here’s a simpler version using sed:
Can you put that in a separate file and call it from your script?
I agree with Kerrek SB – it would help if you’d explain what you’re trying to accomplish!