Skip to main content

Block Pruner

Project description

Block Pruner

How would you go about deleting blocks of [start;end] if the block contains 615 in example.txt ?

example.txt

a
2
start
a
b
615 b
d
end
f
a
g
start
610
h
i
end
b
3
start
e
e
615
s
s
end
a
$ block_pruner --start start --end end --needle 615 example.txt
a
2
f
a
g
start
610
h
i
end
b
3
a

Usage

block_pruner --start start --end end --needle 615 example.txt > out.txt

Development

For help getting started developing check DEVELOPMENT.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

block_pruner-0.0.4.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

block_pruner-0.0.4-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page