Skip to content

Instantly share code, notes, and snippets.

@bacongobbler
Last active December 19, 2015 22:58
Show Gist options
  • Save bacongobbler/6031375 to your computer and use it in GitHub Desktop.
Save bacongobbler/6031375 to your computer and use it in GitHub Desktop.
sed in-place replacement. Usage: './replace <old_string> <new_string> <file>'
#!/bin/sh
sed -i '' "s/${1}/${2}/g" $3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment