[shell] linux下查找某一配置文件,并全部替换内容

touch files-{0..6}.txt
find . -type f -name "*.txt" | awk '{print $1}' | xargs -L 1  bash -c 'echo -e "dilex\nliu" > $0'

posted @ 2023-05-24 17:11  dilex  阅读(28)  评论(0)    收藏  举报