Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.08 KB

README.md

File metadata and controls

33 lines (24 loc) · 1.08 KB

lss

A simple equivalent to the ls command with compact representation for file names with numeric IDs. lss is written in python 2.7 and tested on Ubuntu linux, but should work on many other platforms as well. You need to have python installed to use the command.

Example

Suppose that lsing inside a directory generates the following list:

example.txt     file01-002.txt  file01-004.txt  file01-009.txt  file01-011.txt  file02-02.txt
file01-001.txt  file01-003.txt  file01-006.txt  file01-010.txt  file02-01.txt   file02-03.txt

lssing will generate:

1   example.txt
3   file02-##.txt       1-3
8   file01-###.txt      1-4 6 9-11
  • The first column denotes the number of files in a group of files.
  • The second column denotes the pattern of the file names.
  • The third column specifies the IDs of the files that can be either a range such as 1-4 or a single number. You need to replace the # with the IDs to get the file names.

Tests

lss has some inline tests written using doctest. To run the tests execute lss --test