Skip to content

Instantly share code, notes, and snippets.

@kanazux
Created October 16, 2014 12:38
Show Gist options
  • Save kanazux/d0d424465d4f8dfc128d to your computer and use it in GitHub Desktop.
Save kanazux/d0d424465d4f8dfc128d to your computer and use it in GitHub Desktop.
sed for parts of string
egrep -l '\$error[(\ +)?\=].*[^\)]\;' * --color | xargs -J % sed -e 's/\([\$error\ \=\ ]dgettext.*[^\;]\)/ syslog\(LOG\_NOTICE\, \1\)/g' -i.bak %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment