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 ] ?

link|improve this question

50% accept rate
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
feedback

2 Answers

up vote 1 down vote accepted

Yes. It's called cat.

cat notice.txt origfile.txt > newfile.txt && mv newfile.txt origfile.txt
link|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
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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