Created
April 30, 2020 12:10
-
-
Save insooth/befb0348070bf6eda9b74886a9404d94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ find . -name '*.[ch]pp' -exec sed -i -e '1r../header.txt' -e '1{h;d}' -e '2{x;G}' {} \; | |
$ find . -name '*.[ch]pp' -print | while read f; do sed -i 's/@file\(\s\+\)xxx/@file\1'$(basename $f)'/' "$f"; done | |
$ cat ../header.txt | |
// vim: set et wrap spell ts=2 sw=2 wm=80 tw=80 spelllang=en fenc=utf-8 cc=80: | |
/** | |
* @file xxx | |
* @author Krzysztof Ostrowski | |
* | |
* @copyright Copyright (C) 2020 Krzysztof Ostrowski | |
* | |
* @license All rights reserved. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment