Skip to content

Instantly share code, notes, and snippets.

@platinumthinker
Created July 15, 2016 08:43
Show Gist options
  • Select an option

  • Save platinumthinker/8b5b6e2652ac75c4faf91524f447e17c to your computer and use it in GitHub Desktop.

Select an option

Save platinumthinker/8b5b6e2652ac75c4faf91524f447e17c to your computer and use it in GitHub Desktop.
sed magic delimiter
magic_sed() {
local INPUT_FILE=$1
local REGEXP=$3
local REPLACE=$4
sed -e 's'$'\001'"$REGEXP"$'\001'"$REPLACE"$'\001''g' $INPUT_FILE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment