All Projects → hahwul → gee

hahwul / gee

Licence: MIT license
🏵 Gee is tool of stdin to each files and stdout. It is similar to the tee command, but there are more functions for convenience. In addition, it was written as go

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to gee

goto
Goto - The Good Way to Program
Stars: ✭ 14 (-78.46%)
Mutual labels:  utility, command-line-tool
K2tf
Kubernetes YAML to Terraform HCL converter
Stars: ✭ 477 (+633.85%)
Mutual labels:  utility, command-line-tool
Graphtage
A semantic diff utility and library for tree-like files such as JSON, JSON5, XML, HTML, YAML, and CSV.
Stars: ✭ 2,062 (+3072.31%)
Mutual labels:  utility, command-line-tool
Infinite-File-Curtailer
Curtail is a utility program that reads stdin and writes to a file bound by size.
Stars: ✭ 23 (-64.62%)
Mutual labels:  utility, command-line-tool
Georaptor
Python Geohash Compression Tool
Stars: ✭ 143 (+120%)
Mutual labels:  utility, command-line-tool
json2xml
json to xml converter in python3
Stars: ✭ 76 (+16.92%)
Mutual labels:  utility, command-line-tool
Remarshal
Convert between CBOR, JSON, MessagePack, TOML, and YAML
Stars: ✭ 421 (+547.69%)
Mutual labels:  utility, command-line-tool
diskusage
FANTASTIC SPEED utility to find out top largest folders/files on the disk.
Stars: ✭ 64 (-1.54%)
Mutual labels:  utility, command-line-tool
Asciigraph
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.
Stars: ✭ 1,805 (+2676.92%)
Mutual labels:  utility, command-line-tool
Endlines
Easy conversion between new-line conventions
Stars: ✭ 112 (+72.31%)
Mutual labels:  utility, command-line-tool
Azure Devops Cli Extension
Azure DevOps Extension for Azure CLI
Stars: ✭ 420 (+546.15%)
Mutual labels:  pipelines, command-line-tool
dotfiles
dotfiles symbolic links management CLI
Stars: ✭ 156 (+140%)
Mutual labels:  utility, command-line-tool
Nomino
Batch rename utility for developers
Stars: ✭ 282 (+333.85%)
Mutual labels:  utility, command-line-tool
Text Minimap
Generate text minimap/preview using Braille Patterns
Stars: ✭ 21 (-67.69%)
Mutual labels:  utility, command-line-tool
Gitlab Cli
Create a merge request from command line in gitlab
Stars: ✭ 224 (+244.62%)
Mutual labels:  utility, command-line-tool
wifiqr
Create a QR code with your Wi-Fi login details
Stars: ✭ 207 (+218.46%)
Mutual labels:  utility, command-line-tool
wholesome-cli
Command Line Tool for managing Flutter projects
Stars: ✭ 57 (-12.31%)
Mutual labels:  command-line-tool
TycotBot
TycotBot
Stars: ✭ 24 (-63.08%)
Mutual labels:  utility
iconset
A nifty command-line tool to customize macOS icons
Stars: ✭ 29 (-55.38%)
Mutual labels:  command-line-tool
RawDiskLib
A C# Library to read from raw sectors of a disk
Stars: ✭ 38 (-41.54%)
Mutual labels:  utility


gee
Standard input to each files and stdout. similar to tee, But there's a little bit more and Write in go

🔖 Introduction

Gee is tool of stdin to each files and stdout. It is similar to the tee command, but there are more functions for convenience. In addition, it was written as go. which provides output to stdout and files. In this process, it has various processing functions for lines such as replace, prefix, and suffix, so it can be used as a pipeline configuration or as a utility for testing. For more information, see the usage and case of study below!

🚀 Installation

From source

go install -v github.com/hahwul/gee@latest

With homebrew (only macos)

brew tap hahwul/gee
brew install gee

Download from release page. (macos,linux,freebsd,windows)

wget https://github.com/hahwul/gee/releases/download/v1.0.4/gee_1.0.4_linux_amd64.tar.gz
tar -xvf gee_1.0.4_linux_amd64.tar.gz
cp ./gee /usr/bin

☄️ Usage

▶ ~/go/bin/gee -h (if you install from source)
▶ gee -h
Usage: ./gee [flags] [file1] [file2] ...
(If you do not specify a file, only stdout is output)

Flags:
  -append
        Append mode for files
  -chunked int
        Chuked files from line (e.g output / output_1 / output_2)
  -debug
        Show debug message!
  -distribute
        Distribution to files
  -find string
        Find string in line (colorize red)
  -format string
        Change output format (json, md-table, html-table) (default "line")
  -grep string
        Greping with Regular Expression (like grep)
  -grepv string
        Inverse greping with Regular Expression (like grep -v)
  -inject string
        Inject stdin into the format of the factor value (e.g: -inject='This is %%INJECT%% line!')
  -prefix string
        Prefix string
  -replace string
        Replace string in line with '-find' option
  -reverse
        Reverse string in line
  -rmnl
        Remove newline(\r\n)
  -split string
        Split string within line. (to line , to table, to md-table)
  -suffix string
        Suffix string
  -uncolor
        Uncolorize stdout
  -uniq
        Remove duplicated line
  -version
        Version of gee
  -with-lc
        With letters count (colorize magenta)
  -with-line
        With line number (colorize blue)
  -with-time
        With timestamp (colorize green)

Github action

- name: Gee env
  uses: hahwul/[email protected]
  with:
    input: this is blue
    flags: '-prefix "+prefix+" -suffix "+suffix+"'

📚 Case of Study

gee with prefix and suffix

▶ cat urls | gee -prefix "curl -i -k " -suffix " -H 'Auth: abcd'" curls.sh
curl -i -k https://www.hahwul.com/?q=123 -H 'Auth: abcd'
curl -i -k http://testphp.vulnweb.com/listproducts.php?cat=asdf&ff=1 -H 'Auth: abcd'
curl -i -k https://xss-game.appspot.com/level1/frame  -H 'Auth: abcd'

Find and replace

▶ cat raw.txt | gee -find keep-alive
▶ cat raw.txt | gee -find keep-alive -replace close

https://twitter.com/hahwul/status/1360495560843689989

Specify the maximum length of the file and save it in multiple files.

▶ wc -l http.txt
2278

▶ cat http.txt | gee -chunked 500 output

https://twitter.com/hahwul/status/1360495565633540097

Distribute each line sequentially to multiple files.

▶ wc -l http.txt
2278

▶ cat http.txt | gee -distribute alice.txt bob.txt charlie.txt

https://twitter.com/hahwul/status/1360495570922704897

🌟 Contribute

Contributions are always welcome. Please write/modify the code and send the PR.
Please read Contribute for more information.

🌸 Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].