Skip to content

Instantly share code, notes, and snippets.

@gyfoster
Last active January 13, 2021 19:34
Show Gist options
  • Save gyfoster/6829fb6572d4aa9d0255892c57ed9bd8 to your computer and use it in GitHub Desktop.
Save gyfoster/6829fb6572d4aa9d0255892c57ed9bd8 to your computer and use it in GitHub Desktop.
Edit value in properties file
$ propsFile="/opt/myapp/application.properties"
$ sed -i "s/\(server\.port\=\).*\$/\1New Text Here/" $propsFile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment