I have a list of files in directory They are named:
2.pdb 3.pdb 14.pdb ... 200.pdb ... 1240.pdb
I'd like to combine all of these in this specific order. When I use
cat *pdb > pdb_all.txt
it seems it just makes a random combination (or perhaps it starts will all files that begin with the number 1 (no matter if it is 1, 10 or, 1000).
Can I make this command combine my files in a specific order, or do I rename all my files to contain 4 digits (e.g. 0002, 0003, 0014 etc). I suspect the latter is the easiest way, but how to I do this with the
mv command on a mac?