找到并猫合并CSV文件 [英] find and cat to merge csv files
本文介绍了找到并猫合并CSV文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道我需要使用查找,猫和>>选项-iname,但我觉得很难做到。
提前致谢
解决方案
find〜/ data -name* .x| while read file
do
cat $ file>> 〜/ data / merged.x
完成
I have thousands of files in sub-directories of ~/data. I wish to merge all those csv files with a certain extension say .x and save the merged file to ~/data/merged.x
I know I need to use find,cat and >> with the option -iname, but I'm finding it hard to do.
Thanks in advance
解决方案
find ~/data -name "*.x" | while read file
do
cat $file >> ~/data/merged.x
done
这篇关于找到并猫合并CSV文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文