Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've developed a software and want to submit it in GNU.
But for that i need to insert GNU notice in all the files.
Is there any free software to do this job [inserting a common note to all file ] ?

share|improve this question
1  
You might be mixing GNU and GPL. I assume you want to add a GPL license header to every file. Is this correct? –  vtest Jul 19 '11 at 14:55

2 Answers 2

up vote 1 down vote accepted

Yes. It's called cat.

cat notice.txt origfile.txt > newfile.txt && mv newfile.txt origfile.txt
share|improve this answer
    
i've lots of PHP files, and I've Ubuntu 11.04, guide me –  Sourav Jul 19 '11 at 9:33
1  
If these are PHP, this implies that you know PHP. You should be able to write a simple script to go trough all the files and use the "cat" command. –  Sunny Jul 19 '11 at 13:47

In bash:

for i in `find . -type f` ; do
  cat notice.txt $i > $i.new && mv $i.new $i
done

You probably want to back up your tree before you run this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.