https://github.com/leonardpepa/cut-tool
cut tool written in go
https://github.com/leonardpepa/cut-tool
coding-challenges cut-tool go golang
Last synced: 7 months ago
JSON representation
cut tool written in go
- Host: GitHub
- URL: https://github.com/leonardpepa/cut-tool
- Owner: Leonardpepa
- Created: 2023-12-26T01:36:19.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-02T00:13:26.000Z (almost 2 years ago)
- Last Synced: 2025-01-17T08:45:45.850Z (9 months ago)
- Topics: coding-challenges, cut-tool, go, golang
- Language: Go
- Homepage:
- Size: 52.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cut tool
## Purpose
This project is a solution for [Write Your Own cut Tool](https://codingchallenges.fyi/challenges/challenge-cut)
build for my personal educational purposes## Description
cut is a command line tool, read the [original specification](https://www.gnu.org/software/coreutils/manual/html_node/cut-invocation.html#cut-invocation) for more## Usage
```terminal
Usage: cut-tool.exe OPTION... [FILE]...
Print selected parts of lines from each FILE to standard output.With no FILE, or when FILE is -, read standard input.
Mandatory arguments to long options are mandatory for short options too.
-b, --bytes=LIST select only these bytes
-c, --characters=LIST select only these characters
-d, --delimiter=DELIM use DELIM instead of TAB for field delimiter
-f, --fields=LIST select only these fields; also print any lineUse one, and only one of -b, -c or -f. Each LIST is made up of one
range, or many ranges separated by commas. Selected input is written
in the same order that it is read, and is written exactly once.
Each range is one of:N N'th byte, character or field, counted from 1
N- from N'th byte, character or field, to end of line
N-M from N'th to M'th (included) byte, character or field
-M from first to M'th (included) byte, character or field
```## How to run
1. Clone the repo ```git clone https://github.com/Leonardpepa/cut-tool.git```
2. Build ```go build```
3. run on windows```cut-tool.exe [OPTIONS] [FILE]```
4. run on linux ```./cut-tool [OPTIONS] [FILE]```
5. run tests ```go test ./...```