How do I include a blank line between files I'm concatenating with “cat”?

前端 未结 5 1756
小鲜肉
小鲜肉 2020-12-16 14:14

I want to cat all the files in a directory, but include some spacer between each one.

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-16 15:01

    Try

    find . -type f -exec cat {} \; -exec echo "-- spacer --" \;
    

    Obviously, the 'spacer' can be more than the simple example used here.

提交回复
热议问题