I have a lot of files named like this:
n2+_PiU_w4_5348757.out
n2+_PiU_w2_5348755.out
n2+_PiU_w1_5348742.out
n2+_PiU_w1_5348729.out
n2+_PiU_w1_5348696.out
n2+_PiU_st3_w3_part6_5630814.out
n2+_PiU_st3_w3_part6_5630721.out
n2+_PiU_st3_w3_part5_5630720.out
n2+_PiU_st3_w3_part4_5630813.out
The point is, their names can be completely different and I need to sort them by the number before .out
, i.e. by their ID.
I had a look on some similar questions (Sort based on the third column, Linux sort last column), but I'm not able to used sed
or awk
for my needs.
Would you, please, provide some way to sort them? Preferably using bash
.
bash
is not a text editor. – don_crissti Mar 03 '18 at 21:05