Skip to content

bash-bastion/bash-algo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

bash-algo

Common algorithms implemented in pure Bash

All algorithms use only builtins and create no subshells

Algorithms

  • URL encode
  • URL decode
  • base32 encode
  • base32 decode
  • base64 encode
  • base64 decode
  • ascii85 encode
  • ascii85 decode
  • PEM encode
  • PEM decode
  • adler32
  • crc32
  • crc64
  • md5
  • sha1
  • sha256
  • str.compare
  • str.contains
  • str.count
  • str.fields
  • str.has_prefix
  • str.has_suffix
  • str.index
  • str.join
  • str.last_index
  • str.repeat
  • [-] str.replace
  • [-] str.replace_all

String manipulation functions modeled from Go's strings module.

Roadmap

  • Pem_encode/decode uses subshells

Installation

Use Basalt, a Bash package manager, to add this project as a dependency

basalt add bash-bastion/bash-algo