Skip to content

Instantly share code, notes, and snippets.

@pshynin
Created March 7, 2018 18:28
Show Gist options
  • Save pshynin/561889aa4739b4b871d373a5858a5408 to your computer and use it in GitHub Desktop.
Save pshynin/561889aa4739b4b871d373a5858a5408 to your computer and use it in GitHub Desktop.
Add header to the file
#!/bin/bash
for d in $(find -name *.java)
do
if ! grep -q 'YOUR HEADER TEXT HERE' $d
then
cat HEADER_HERE.txt $d >$d.new && mv $d.new $d
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment