Append a text to the end of multiple files in Linux

前端 未结 6 1431
囚心锁ツ
囚心锁ツ 2021-02-05 01:05

I need to append the following code to the end to all the php files in a directory and its sub directory:

6条回答
  •  借酒劲吻你
    2021-02-05 01:55

    I usually use tee because I think it looks a little cleaner and it generally fits on one line.

    echo "my text" | tee -a *.php
    

提交回复
热议问题