LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Closed Thread
  Search this Thread
Old 01-15-2014, 09:51 AM   #1
chinabenjamin66
Member
 
Registered: Mar 2012
Location: Shenzhen Chian
Posts: 73

Rep: Reputation: Disabled
How to replace or remove some lines recusively in all files in a folder


Hello All,

I got source code of some software, found there is copyright statement at the top of almost every .c or .h files. I would like to remove them or replace with other statement via a tool or simple shell script.

Can any one give me some suggestions?

Thanks
 
Old 01-15-2014, 10:00 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by chinabenjamin66 View Post
Hello All,

I got source code of some software, found there is copyright statement at the top of almost every .c or .h files. I would like to remove them or replace with other statement via a tool or simple shell script.

Can any one give me some suggestions?

Thanks
Yeah! Don't do it at all! That's called copyright infringement!

Not totally sure, but I believe the proper/acceptable way to do that is to ADD lines giving your copyright, indicating that you've made changes to the source, but that's a gray area to me because if you just change one file, one line, to me it's not like you're supposed to then claim copyright for every file.

OK, maybe it's really old and the originator no longer exists. I find that difficult to believe, and secondly ... create your own code! If it is really old, it's probably out of date and requires updating. Using that code as a guide to create something similar, but up to date might be acceptable if you don't copy verbatim the entire architecture.
 
Old 01-16-2014, 09:15 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Any open source license requires that copyright statements remain in place. If you change code you can add your own copyright to the files, but changing a file does not make the original copyright invalid.

There are cases where replacing the copyright is allowed, but for now this thread will be closed. If you want to have it reopened contact me via email, but I will have to look at the code first.

Last edited by TobiSGD; 01-16-2014 at 09:16 AM.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Perl: how to replace blank lines in a file with given lines from another karamaz0v Programming 8 04-19-2012 06:48 AM
Bash script to find and remove similar lines from multiple files linuxquestion1 Programming 9 07-13-2011 01:45 AM
[SOLVED] Need to remove dynamic string across multiple lines and files. vandigroup Linux - Server 2 05-14-2011 11:50 PM
How to move a folder and replace files RAdams Linux - Newbie 2 06-24-2006 12:11 AM
Recusively deleting files? The_Nerd Linux - Software 7 05-20-2004 12:32 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 11:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration