I start with 10 files called file_8_123_1, file_8_124_1, file_8_125_1, file_8_126_1.....etc etc.
I need to cat these files together starting with the higest number file being catted to the next highest in sequence then being deleted
eg.
Above would be
cat file_8_126_1 >> file_8_125_1
rm file_8_126_1
cat file_8_125_1 >> file_8_124_1
rm file_8_125_1
etc etc
I need a script where the user inputs the highest file number (the only number that changes is the 123 above) and the lowest number so that the script knows at what point to stop deleting the files and where to start.
Any solutions out there ?
I need to cat these files together starting with the higest number file being catted to the next highest in sequence then being deleted
eg.
Above would be
cat file_8_126_1 >> file_8_125_1
rm file_8_126_1
cat file_8_125_1 >> file_8_124_1
rm file_8_125_1
etc etc
I need a script where the user inputs the highest file number (the only number that changes is the 123 above) and the lowest number so that the script knows at what point to stop deleting the files and where to start.
Any solutions out there ?