/this/is/a/file/path/product-2.0/file/name/7
/this/is/a/file/path/product-2.0/file/name/10
/this/is/a/file/path/product-2.0/file/name/12
/this/is/a/file/path/product-2.0/file/name/13
/this/is/a/file/path/product-2.0/file/name/6
/this/is/a/file/path/product-2.0/file/name/8
/this/is/a/file/path/product-2.0/file/name/9
zaman grep aracılığıyla Ben boru onu bu bir çeşit şöyle sıralamak ihtiyacım sonunda bir sürüm numarasına sahip dosyaların bir listesi var:
echo $files | sort -n
/this/is/a/file/path/product-2.0/file/name/10
/this/is/a/file/path/product-2.0/file/name/12
/this/is/a/file/path/product-2.0/file/name/13
/this/is/a/file/path/product-2.0/file/name/6
/this/is/a/file/path/product-2.0/file/name/7
/this/is/a/file/path/product-2.0/file/name/8
/this/is/a/file/path/product-2.0/file/name/9
-n dosya ismindeki ilk numara ile -n karıştırıldığını düşünüyorum.
Geçen sayısına göre sayısal olarak sıralayabilir nasıl
yolun aynı derinlik? – Kevin
evet, ama ben derinlik bilmiyorum –