Given files named 1.csv, 2.csv, 3.csv, …89.csv… n.csv
how do I append them together in numeric order)(1 to n) in bash shell script?
is there a one-liner for the solution?
Given files named 1.csv, 2.csv, 3.csv, …89.csv… n.csv how do I append them together
Share
If your files where named with leading zeros, it would be easier, i.e.
But its not too hard to get a true numeric order, given
(in both samples, note that the option to ls is the number one, (1), not the letter L (l))
AND
THEN
Assuming all your csv files are numbered.
If you have more than 1000 files, file arg processing in the shell may break down, and you should post a new question for correct use of xargs.
To see what is happening add shell debugging/trace use
.
IHTH.