Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有如下所示的文件列表:
/somedir/file1.fa >foo ATCGGGGG /somedir/file2.fa >bar CCCCCCC
这些文件有很多。
我想使用以下命令执行 CAT
find /somedir/ -name "*.fa" | xargs cat > All.fa
但是为什么我在All.fa
All.fa
>foo ATCGGGGG>bar CCCCCCC
代替
>foo ATCGGGGG >bar CCCCCCCC
有没有办法纠正它?
看起来您的文件最后缺少换行符。
find /somedir/ -name "*.fa" | xargs -n 1 -I % bash -c "cat %; echo" > All.fa