ArdeshirV / NumericFileSort

Python script that sorts text file lines by floating point number at the start of each line of file. You can use it with a file as argument or with stdin with regular commands output.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NumericFileSort

NumericFileSort.py is a useful python script that reads a regular text file as an argument or as a stdin and then sort all file lines by floating numbers that is exists at the start of each line of file. NumericSortFile ignores all white spaces before floating numbers. Lines without numeric prefix will be absent in output.

Usage:


Here you can see a usual Linux command output:

without using numericfilesort


We can sort above output with below command very easily:

without using numericfilesort



Copyright© 2021 ArdeshirV@protonmail.com, Licensed under GPLv3+

About

Python script that sorts text file lines by floating point number at the start of each line of file. You can use it with a file as argument or with stdin with regular commands output.

License:GNU General Public License v3.0


Languages

Language:Python 98.3%Language:Shell 1.7%