Giter VIP home page Giter VIP logo

libbash's Introduction

libbash: bashing for the masses

Ever have been in a situation in bash where...

  • You need starred password input?
  • Need microtime, nanotime or millitime?
  • Need to convert timestamps to dates?
  • Need an easy way to make output colorful?
  • Need a standard way to create sequence scripts?

... then libbash is for you.

And never forget that Bash cures cancer

So, what does it do?

libbash has a few files containing helper functions:

  • bashr.sh : A quick-and-dirty bash framework for creating and nicely displaying sequencial process (builds, bootstraps, etc). See example.sh for more details
  • colorize.sh : echo "I feel blue" | red | bold
  • date.sh : Deals with time-based issues
  • query.sh : query $(echo "I feel blue. How do you feel?" | red | bold)
  • spinner.sh : Attach a spinner to a given process, and dies out when the process disappears. See example.sh for more options.
  • memcached.sh : Gives access to utility functions for interacting with Memcached/Membase.

Sounds great. How do I use thoses?

In your script

. /usr/lib/bash/colorize.sh

You can put this in any bash script you want, and bam, coloring pipes available. You can also decide to import this in your .bashrc and use them as user command in your shell.

Example, you could do this:

mbGet some_memcached_key | sed '1 d;$ d' | tee dump | grey | less -R

... ok, not super useful. But you get the point, and hopefully, you will see the potential I see in this.

But what about the other libbash?

Looks dead to me, so i though I could use the name. If the name is confusing, I have nothing against changing it.

Up next

  • Parsers for JSON, XML, and other (if anyone is up for it!)
  • Some bugfixes.
  • Bash networking library.
  • Basic HTTP request manager.

Installation

  1. git clone https://github.com/Wizcorp/libbash.git /usr/lib/bash

NOTE: You can choose a revision by loading a specific tag. See the list here on GitHub

Collaborators

libbash's People

Contributors

stelcheck avatar almirkadric avatar

Watchers

James Cloos avatar

Forkers

qinshulei

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.