| |

VerySource

 Forgot password?
 Register
Search
View: 882|Reply: 6

Add "copyright notice" to the beginning of all source code files

[Copy link]

3

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-2-16 21:00:02
| Show all posts |Read mode
Write a program: add "copyright notice" to the beginning of all source code files
Reply

Use magic Report

0

Threads

25

Posts

19.00

Credits

Newbie

Rank: 1

Credits
19.00

 China

Post time: 2020-4-19 05:30:01
| Show all posts
I wonder if the landlord will use sed
There are also under the windows platform.
Reply

Use magic Report

3

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-4-19 22:15:01
| Show all posts
will not!
Can you give a hint?
Thank you!
Reply

Use magic Report

0

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-4-20 17:00:01
| Show all posts
It seems easy to take. G
Reply

Use magic Report

0

Threads

25

Posts

19.00

Credits

Newbie

Rank: 1

Credits
19.00

 China

Post time: 2020-4-21 16:00:01
| Show all posts
Plug in front
 sed -i '1 i\mydata' profile

first row
 sed -i '1 s / ^ / mydata /' profile

It is also very convenient to use tools such as ed, perl, awk
Reply

Use magic Report

0

Threads

78

Posts

29.00

Credits

Newbie

Rank: 1

Credits
29.00

 China

Post time: 2020-4-22 11:15:01
| Show all posts
1 Generate a file of copyright information
2 Generate a temporary file, copy all the contents of the copyright information file, and then continue to copy all the contents of a source file
3 This temporary file is the required file.

This completes the addition of copyright information to a source file.

You can perform similar operations on all source files.
For example, by traversing the directory,
Get all the file names,
Then cycle through the above operations ~~~
Reply

Use magic Report

0

Threads

25

Posts

19.00

Credits

Newbie

Rank: 1

Credits
19.00

 China

Post time: 2020-4-28 15:45:02
| Show all posts
sed -i * .c is fine
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list