cli

module
v0.0.0-...-3815662 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2023 License: MIT

README

Command Line Utilities

This repository is a collection of command line utilities that make my shell experience better. The utilities are written in Go and are available on Github. Some utilities are really simple, like upper and lower, but I find them easier to remember than the syntax to awk or tr to change the case of a string in the shell. Other utilities like stripext and stripfile remove the annoying need to quote or escape filenames that have a hyppen as a prefix.

$ basename ./-N0F1689aweRQf395IVo.json .json
-N0F1689aweRQf395IVo

basename -- -N0F1689aweRQf395IVo.json .json
-N0F1689aweRQf395IVo

### OR ###
 
$ stripext -N0F1689aweRQf395IVo.json
-N0F1689aweRQf395IVo

spilling misteak

NOTE: pushid comes from the themartorana pushID.go gist. All other code is original.

  • arr: print specified quoted column
  • coln: print specified column
  • erlnum: covert Erlang list of numbers to ascii
  • fire: retrieve firebase data
  • grop: filter objects from gron output
  • jkc: count json keys in multiple files
  • lower: convert to lower case
  • pushid: generate unique id
  • stripext: strip file extension
  • stripfile: strip file name
  • upper: convert to upper case

To compile all executables, just make in the top level directory. All source code is written in Go and the binaries will be installed in $GOPATH/bin.

$ make
cd arr && go install
cd coln && go install
cd erlnum && go install
cd fire && go install
cd group && go install
cd jkc && go install
cd lower && go install
cd pushid && go install
cd stripext && go install
cd stripfile && go install
cd upper && go install

Directories

Path Synopsis
jkc
cnt
* * This code comes from https://gist.github.com/themartorana/8c8b704432c8be1fed9a * Only modification is change in main function to output just one pushid.
* * This code comes from https://gist.github.com/themartorana/8c8b704432c8be1fed9a * Only modification is change in main function to output just one pushid.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL