Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Changing license of a project with sed

To change the license of a project I published, at the request of a friend:

sed -i -r -e 's/CC-BY-SA-4.0/LGPL-2.1-only/g;' $( grep -l -riIE 'SPDX-License-Identifier' | xargs grep -l -iE 'Author.?:.*bgstack15' )

If it's not obvious, for each file where SPDX-License-Identifier exists where I am the author, change the license name. Alanis-Morissettely, it was only the one file in the small project, but I only learned that when checking after the fact.

You're welcome, Plasma41.

Comments