Skip to content

Instantly share code, notes, and snippets.

@mieitza
Forked from andreagrandi/substitute_string
Created November 1, 2015 19:32
Show Gist options
  • Save mieitza/49f862be780e81e1bf70 to your computer and use it in GitHub Desktop.
Save mieitza/49f862be780e81e1bf70 to your computer and use it in GitHub Desktop.
Substitute a placeholder like {{hostname}} that is inside a file, with the output of the hostname command.
sed -i "s/{{hostname}}/`hostname`/g" /etc/supervisor/conf.d/celeryd.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment