https://github.com/vegarsti/slice
command line utility for slicing lines, alternative to cut
https://github.com/vegarsti/slice
command-line golang unix
Last synced: 11 months ago
JSON representation
command line utility for slicing lines, alternative to cut
- Host: GitHub
- URL: https://github.com/vegarsti/slice
- Owner: vegarsti
- License: mit
- Created: 2021-03-17T20:07:35.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-03-23T10:33:58.000Z (over 5 years ago)
- Last Synced: 2025-07-19T19:37:29.957Z (11 months ago)
- Topics: command-line, golang, unix
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slice
Like [`cut`](https://en.wikipedia.org/wiki/Cut_(Unix)), but with the negative slicing we know and love.
## Installation
```sh
$ go get "github.com/vegarsti/slice"
```
## Usage
```sh
$ echo "hello world" | slice 1:-1
ello worl
$ echo "hello\nyou" | slice 1:-1
ell
o
$ echo "hello\nyou" | slice 1:
ello
ou
$ echo "hello\nyou" | slice :2
he
yo
```