Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nymann/block-pruner
https://github.com/nymann/block-pruner
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/nymann/block-pruner
- Owner: nymann
- Created: 2022-08-27T12:12:04.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-08-28T00:29:50.000Z (about 2 years ago)
- Last Synced: 2024-03-15T06:24:59.009Z (8 months ago)
- Language: Python
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Block Pruner
How would you go about deleting blocks of `[start;end]` if the block contains `615` in _example.txt_ ?
_example.txt_
```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
```sh
block_pruner --start start --end end --needle 615 example.txt > out.txt
```## Development
For help getting started developing check [DEVELOPMENT.md](DEVELOPMENT.md)