Partial-sh
Examples
Example single line
Command:
echo '{"name":"Jay Neal", "address": "42 Main St 94111"}' | pt -i "Split firstname and lastname" -i "remove the address"
Output:
{ "first_name": "Jay", "last_name": "Neal" }
Example multi lines
Create data.jsonl JSON Lines file:
cat << EOF > data.jsonl
{"name":"John Doe","date_of_birth":"1980-01-01", "address": "123 Main St"}
{"name":"Jane Smith","date_of_birth":"1990-02-15", "address": "456 Main St"}
{"name":"Jay Neal","date_of_birth":"1993-07-27", "address": "42 Main St 94111"}
{"name":"Lisa Ray","date_of_birth":"1985-03-03", "address": "789 Elm St"}
EOF
Transform the data:
cat data.jsonl | pt -i "Split firstname and lastname" -i "remove the address"
Output:
{"date_of_birth": "1980-01-01", "first_name": "John", "last_name": "Doe"}
{"date_of_birth": "1990-02-15", "first_name": "Jane", "last_name": "Smith"}
{"date_of_birth": "1993-07-27", "first_name": "Jay", "last_name": "Neal"}
{"date_of_birth": "1985-03-03", "first_name": "Lisa", "last_name": "Ray"}
Release files for partial-sh 0.7.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 | |
|---|---|---|---|
| partial_sh-0.7.2.tar.gz | 95.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| partial_sh-0.7.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 142.7 kB
Release files / partial_sh-0.7.2.tar.gz
| Download URL | partial_sh-0.7.2.tar.gz |
|---|---|
| Size | 95.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a999b15480de4e0ab9b24aadd2b10681fddaca30ab55c421b10dc6d6cdd34e3a
|
|
BLAKE2b-256 checksum How to use checksums |
cfd071b4011274dcd33790ad6dac8e196c9a467f8446be237b3dfdd6fe06dce4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.1 Linux/6.6.26-linuxkit
|
Release files / partial_sh-0.7.2-py3-none-any.whl
| Download URL | partial_sh-0.7.2-py3-none-any.whl |
|---|---|
| Size | 46.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e699290cf2def1838513ea775e18b6e8133d7018d3654a8091111bbe5fa6617
|
|
BLAKE2b-256 checksum How to use checksums |
060e3a68262643493005c979dd674807fa9706068408d0234ce3ceb50b8151b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.12.1 Linux/6.6.26-linuxkit
|