bninja is a collection of cross-platform command line tools with some extra features(clipboard support) and defaults to improve experience of bash/shell/terminal users.
Everything is written in Golang hence it can run in Linux,Windows and MacOS.
All tools are subcommands of bninja command. These tools are -
- bninja cut - Similar to GNU cut but better
- bninja diff - Get unique and Common lines of files
- bninja dummy - Dummy Module to pass data from input source to output
- bninja getlen - Returns length of the given string
- bninja hcut - Cut Data horizantally similar to GNU cut but horizantal
- bninja html - HTML Encoder/Decoder
- bninja json - Format and Colorize JSON
- bninja replace - Match & Replace Data
- bninja sort - Sort Input data in ascending/descending order
- bninja uniq - Print Unique lines
- bninja url - A Simple URL Encoder and Decoder
The Obvious advantage is that all these commands can read and write from clipboard & files .Other advantages include less options and default behaviour such as trim spaces from each line.
For Example-
Same as GNU cut but delimeter can be more than 1 characters . Skip lines that does not contain delimeter using (--skip) option.
Similar to GNU cut but cut data horizantally i.e cut entire document based on delimeter and print rows based on user input.
Compare two files and get unique lines that are common or belongs to a particular file.
Get unique lines from input . By default trims extra spaces on each line . (GNU uniq only detects duplicates only if they are adjacent)
An Alternative to sed but less of an eyesore. Match and replace strings (NO Syntax, uses options instead of subcommands like /s or /g) . options are similar to replace functions in go or python.
-
Make Sure you have go installed properly or install go
-
Install Using go
go install github.com/tarunKoyalwar/bninja/cmd/bninja@latest
If you loved this tool . Star / Watch this repo to show support and to not miss any feature updates.
If you like bninja
and want to see it improve furthur or want me to create other interesting projects , You can buy me a coffee