sed cheat sheet Substitute some file content sed -i 's/^-Xms1g/-Xms8g/g' opensearch/config/jvm.options Append a new line at the end of the file sed -i '$aplugins.security.disabled: true' opensearch/config/opensearch.yml