Modify config files with sed and handle path insertion

Use sed to find lines that begin with desired text and then fill in space after with desired text.

Also, since the text being inserted is a path, the slashes would screw up the sed command, so you can (and need) to use character other than slash to separate sed commands. Any character will work, as long as it isn’t present in your string of characters being inserted. I used a percent symbol.

“`sed -i "/^genome=/ s% %$oly_genome %" "$maker_opts_file"“`

“`sed -i "/^est=/ s% %$oly_transcriptome %" "$maker_opts_file"“`

“`sed -i "/^protein=/ s% %$gigas_virginica_ncbi_proteomes %" "$maker_opts_file"“`

#bash, #linux, #sed