I have about 10 fasta files that I need to pull from a giant folder of other fasta files (has about 100 files). I have a list of the files I need in a .txt file separated by line and I want to pull out the 10 fasta files listed and combine them into one big file.
I tried this command at first:
xargs < names.txt cat > names.fasta
But it gave me this error:
cat: 'read_1.fasta'$'\r': No such file or directory
For all the files except the last read in the list which it managed to add to the
I'm not sure what the error message means given I can find the files in my folder so they should be there. I can do this manually but I know it'll take a while to do.
EDIT: I changed the list to be separated by space and it actually pulled out all the files I needed! However, is there a way to account for reading in the names by newline instead of space??