Skip to content

YanziNetworks/yu.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yu.sh

yu.sh stands for Yanzi Utilities in POSIX Shell. The library provides a number of functions and modules that can be sourced in target scripts. All functions and variables that are part of the yu.sh library are led by, respectively the yush_ and YUSH_ keywords. yu.sh also provides a few utilities. yu.sh should normally work on MacOS. Feel free to open issues for improvement suggestions or bug reports.

yu.sh is usually best used as a git submodule.

Currently, yu.sh is composed of the following modules:

  • log.sh a library for controlled logging, offering various levels
  • date.sh a library to convert back and forth between human-readable periods and seconds, and to convert some date formats not always supported by the date command.
  • json.sh a library to parse JSON, slightly modified from the fantastic original
  • text.sh a library to provide higher-level textual operations.
  • file.sh a library to operate on files and paths
  • multi-arch.sh a library to compensate for missing features across architectures or provide emulation functions.

Testing

This library can be tested using bats. From the test directory, run the following command:

docker run -it -v "$(pwd):/yu.sh" bats/bats -t /yu.sh/test

About

Yanzi Utility library in posix SHell

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages