Crates.io | sort-path-length |
lib.rs | sort-path-length |
version | 0.3.1 |
source | src |
created_at | 2023-02-08 19:07:11.081109 |
updated_at | 2023-02-10 00:47:18.870175 |
description | Takes a file of paths and sort them by component length |
homepage | https://reinaldorauch.dev.br/sort-path-length |
repository | https://github.com/reinaldorauch/sort-path-length |
max_upload_size | |
id | 780135 |
size | 62,912 |
Binary package to sort paths based on their component's length
$ cargo install sort-path-length
$ sort-path-length <path>
where <path>
is a file containing paths separtated by \n
(new line).
Or you can pass via pipe in the terminal like so:
$ cat a_file | sort-path-length
If you do not pass a file in the argument or the file name is "-" the program will expect input in the stdin
/a/absolute/path
/a/b/c/d/e
/a
/a/dpasodj
the output on stdout should be
/a
/a/dpasodj
/a/absolute/path
/a/b/c/d/e