buzzybox

command module
v0.0.0-...-72f204f Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 2 Imported by: 0

README ΒΆ

🐝 buzzybox: Portable shell utilities

buzzybox is a multicall binary like busybox that brings a subset of shell utilities to multiple platforms. It can be run as a standalone program (buzzybox) or imported as a library (lesiw.io/buzzybox/hive).

Features

Installation

go install lesiw.io/buzzybox@latest

Usage

Subcommand
echo "hello embedded world" | buzzybox awk '{ print $1, $3 }'
ln -s "$(which buzzybox)" awk
echo "hello embedded world" | ./awk '{ print $1, $3 }'
Library
package main

import (
	"strings"

	"lesiw.io/buzzybox/hive"
)

func main() {
	cmd := hive.Command("awk", "{ print $1, $3 }")
	cmd.Stdin = strings.NewReader("hello embedded world")
	cmd.Run()
}

▢️ Run this example on the Go Playground

Docker
echo "hello embedded world" | docker run -i lesiw/buzzybox awk '{ print $1, $3 }'

App criteria for inclusion

One of the following:

  1. The app is defined in the POSIX standard.
  2. The app isn’t in POSIX, but is found in multiple *nix environments, like MacOS, busybox, and at least one major non-busybox Linux distribution. (tar is a good example of a non-POSIX utility that is near-ubiquitous.)

And all of the following:

  1. Orthogonal: the app solves a problem that cannot reasonably be solved by using the existing apps in combination.

Support matrix

App Linux Windows MacOS TinyGo
arch βœ… βœ… βœ… βœ…
awk βœ… βœ… βœ… βœ…
base64 βœ… βœ… βœ… βœ…
basename βœ… βœ… βœ… βœ…
cat βœ… βœ… βœ… βœ…
false βœ… βœ… βœ… βœ…
true βœ… βœ… βœ… βœ…

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
internal

Jump to

Keyboard shortcuts

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