for x in `find -type f`; do sed -n "1{s,.*,${x##*/}\t&,p}" $x; done > output.csv

for x in `find -type f`; do sed -n "1{s/.*/${x##*/},&/p}" $x; done > output.csv

for x in `find -type f`; do sed -n "1{s/.*/${x:2},&/p}" $x; done > output.csv

Refer:http://bbs.chinaunix.net/thread-4152680-1-1.html

 

posted on 2017-12-18 12:41  窗外蔡大岭  阅读(167)  评论(0编辑  收藏  举报