# sel
sel is an inline field selection and table transformation tool that aims to replace cut.
pip install sel
## Simple
Selecting a field from a line requires a single character:
$ echo a b c d e | sel 3 c
sel understands field ranges, in python style:
$ echo “a b c d e” | sel 2:4 b c d
$ echo “a b c d e” | sel 2:-2 b c d
$ echo “a b c d e” | sel 3: c d e
## Flexible
By default, sel splits the input on whitespace. It can also use a custom string or regular expression:
$ cat users.csv 1241,Bob 3192,MitM 3255,Alice
$ cat users.csv | sel 1 –delim , 1241 3192 3255
$ echo 1a2b3c4d | sel –regex [a-z] 2:3 2 3
## Powerful
sel works well on multiline input, and can take advantage of table headers if present. It can also produce tabular outputs.
$ ps aux | sel 1 –skip-header root user1 user2
$ ps aux | sel –align %MEM PID COMMAND PID COMMAND %MEM 2414 /opt/google/chrome/chrome 1.7 5272 /opt/sublime_text_2/sublime_text 1.6 4662 /usr/bin/python3 1.5 2470 /opt/google/chrome/chrome 1.5
Metadata
Release files for sel 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sel-0.2.2.tar.gz | 3.3 kB | Without provenance | Details |
Release files / sel-0.2.2.tar.gz
| Download URL | sel-0.2.2.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
56d020115aeefb94b8aa01785b1f7628ed38e21a28422f98ef1c35369837f1f7
|
|
BLAKE2b-256 checksum How to use checksums |
ce4f344310c20050a9f4a2e4b1bfb987f6cc902cbc01d957cd2e7370553d6a2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sel 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.