递归替换版权

递归替换版权

我当前目录下有很多文件。

每个文件都包含版权标头,例如,

    #
    # Copyright 2013 Company, Inc. All rights reserved. This software
    # is property of Company, Inc and contains trade secrets,

我想替换Copyright 2013 CompanyCopyright 2014 Company

我怎样才能做到这一点?

我试过:

find . -type f -exec sed -r -i "/Copyright\/ 2014\/ Company/d" {} +

答案1

尝试:

find . -type f -exec sed -r -i "s/Copyright 2013 Company/Copyright 2014 Company/g" {} \;

相关内容