...By the file extension, you can specify which kind of the files to be read.
While iterating those files, it inserts the comment lines for the copyright notice into each of them.
Finally, the new files are written to the corresponding directory node under the destination directory tree.
$. Default templates
As default, I wrote the templates of the copryright notice of:
GNU General Public License version 3
Apache License, Version 2.0
for the files with:
.java
.xml
.sh
.txt
extensions.
$. Example for how to use the 'here document'
In the UNIX shell scripting, the idiom by 'here document' can make the variable substitution easier.
...