Say you have a project, say it is LaTeX, and that you intent to publish the final product.
Say that you have an upcoming deadline, and you wish the publication to be printed and available at a rather fine conference.
Say that you enter that project late in the game, and (stupidly) don’t spend a thought on the source code license, because there are not much time left until the deadline.
And then, after the deadline, say that there are some people interested in said source code. Since the final product was published under a nice license, the intent was of course always to have the source code that way as well, it just… kindof, slipped between the chairs.
So there we are, source code without any license notice of any kind. What do?
(Obviously the answer is to get a license header into the files)
Say you are lazy. Manually adding those two lines of license data, even if only to a meager count of 15 files, is a chore you’d rather avoid.
You might start experimenting with cat for instance something along the lines of
cat license somefile > somefile
You realize that that approach is full of fail, but, if you’re in luck, you work in a pretty cool place, and get to have pretty cool work buddies. Work buddies which are pretty good at wielding bash, and concoct stuff like:
for f in *.tex; do (cat license; cat $f) > ${f}.new; mv ${f}.new $f; done
The result, finally, speaks for itself.