Skip to content

Instantly share code, notes, and snippets.

@karagenit
Last active July 30, 2017 20:21
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 karagenit/dc60ca5e88e92301436c42e06ba46a69 to your computer and use it in GitHub Desktop.
Save karagenit/dc60ca5e88e92301436c42e06ba46a69 to your computer and use it in GitHub Desktop.
Rename WPI File Headers
#!/bin/sh
find . -type f -exec sed -i -e 's/FIRST (20[0-1][0-9])-(20[0-1][0-9])\./FIRST \1-2017./g' {} \;
find . -type f -exec sed -i -e 's/FIRST (20[0-1][0-9])\./FIRST \1-2017./g' {} \;
@karagenit
Copy link
Author

A search of the wpilibsuite/cscore repo showed 65 source files matching "Copyright (c) FIRST". After running this script, a search using grep -nrw . -e '2017.' | wc -l returned 66 - grep was returning a random blank line, so the regex worked as expected.

Of course, there's that pesky license file to deal with...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment