Git Product home page Git Product logo

shunc's Introduction

shunc

Build Status

The goal of this library is to make shell scripting easier for everyone. Your shell of preference should not matter!

This script will not change the state of your variables. Meaning that if a function needs to declare a variable it will save the previous value and reset the variable's value after execution.

Installation

  1. Generate the script:
./bin/generate
  1. The script will be in dist, move it into your own project.
  2. Add this to the beginning of your script:
. <Path_To_New_Location>/shunc

Examples

#!/bin/sh

. $HOME/dev/password_check/lib/shunc

[ "$(_length $1)" -gt 8 ] && echo PASS || echo FAIL

Documentation

You can find documentation for the various functions on the wiki.

Linting

docker run -e SHELLCHECK_OPTS="-e SC1091" -v "$PWD:/mnt" koalaman/shellcheck <Path_To_File>

Testing

Prerequisite(s)
All tests
./bin/run_tests
Single test
sh <Path_To_Test>

Submodules

Retrieve all submodules
git submodule update --remote --recursive --init

shunc's People

Contributors

patrickduncan avatar

Watchers

 avatar  avatar

shunc's Issues

Add includes

Checks whether a string contains the specified string/characters

Add index_of

Returns the position of the first found occurrence of a specified value in a string

Add slice

Extracts a part of a string and returns a new string

Add match

Searches a string for a match against a regular expression, and returns the matches

Add upcase

Converts a string to uppercase letters

Add substring

Extracts the characters from a string, between two specified indices. End being exclusive

Add replace

Searches a string for a specified value, or a regular expression, and returns a new string where the specified values are replaced

Add char_at

Returns the character at the specified index

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.