Skip to content

Instantly share code, notes, and snippets.

@trodrigu
Created March 18, 2016 18:58
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 trodrigu/8b9f214410dfb51a8705 to your computer and use it in GitHub Desktop.
Save trodrigu/8b9f214410dfb51a8705 to your computer and use it in GitHub Desktop.
Shell script to remove lines from top of file
#!/bin/bash
# Make sure to chmod +x remove_header.sh
ag 'Created (?=by)' -l | while read file
do
sed -i .bak '1,17d' $file
rm "$file.bak"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment