To sort the files in a directory, such as
file_2.txt
file_12.txt
file_43.txt
file_1.txt
ls command will get you, this
file_1.txt
file_12.txt
file_2.txt
file_43.txt
if you want the sorted list to look like
file_1.txt
file_2.txt
file_12.txt
file_43.txt
according to the numeric order, then you need to sort command
ls *.txt | sort -t_ -k2 -n
-t specifies the separator
-k specifies the field id
-n indicates numeric sorting
Subscribe to:
Post Comments (Atom)
RISC-v emulator
Changes are based on https://risc-v-getting-started-guide.readthedocs.io/en/latest/linux-qemu.html For Ubuntu/Debian, in addition to sud...
-
It took me a few days to resolve this problem with the NTL library on Mac OS X. http://www.shoup.net/ntl/doc/tour-unix.html So I am...
-
/etc/rc.local # Put your custom commands here that should be executed once # the system init finished. By default this file does nothing. ...
-
Tweak the LINUX_VERSION variable in target/linux/ar71xx/Makefile. Supported Kernels are listed in include/kernel-version.mk
No comments:
Post a Comment