Skip to content

Instantly share code, notes, and snippets.

@epcim
Created May 1, 2019 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save epcim/e4708a7967e72401ff181fb624f09445 to your computer and use it in GitHub Desktop.
Save epcim/e4708a7967e72401ff181fb624f09445 to your computer and use it in GitHub Desktop.
sed
# rewrite part of the file from variable
sed -i "/^write_files:/{
s/write_files://g
r $NET_RULES
}" $CLOUD_CONFIG_FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment