Skip to content

Instantly share code, notes, and snippets.

@gildegoma
Created August 30, 2013 12:19
Show Gist options
  • Save gildegoma/6389300 to your computer and use it in GitHub Desktop.
Save gildegoma/6389300 to your computer and use it in GitHub Desktop.
Add a line on top of files that don't include this header pattern yet
grep -LE '^PATTERN' */filename.ext | xargs -I{} dirname {} | xargs -I{} gsed -i '1s/^/PATTERN with {} dynamic\n/' {}/filename.ext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment