Skip to content

YMC-GitHub/sh-lib-dic-fun

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sh lib dic-fun

desc

some function for handle dic for ymc shell lib

deps

  • sh-lib-str
  • sh-lib-arr
  • sh-lib-time-cost v1.0.0
  • sh-lib-test

apis

  • dic_ini
  • dic_create
  • dic_update
  • dic_read
  • dic_delete
  • dic_remove
  • dic_c
  • dic_u
  • dic_r
  • dic_d
  • dic_add
  • dic_get
  • dic_del
  • dic_has
  • dic_clear
  • dic_print
  • dic_keys
  • dic_count
cat src/index.sh | grep "function " | sed "s/function */- [x] /g"  | sed "s/() *{//g"

feats

  • basic curd dic eg.
  • with api style create/update/read/delete
  • with api style c/u/r/d
  • with api style create/update/read/remove
  • with style add/get/del

how to use for poduction?

# get the code

# run the index file
# ./src/index.sh

# or import to your sh file
# source /path/to/the/index file

# simple usage
declare -A a #ok
#eval "declare -A a" #ok
dic_c "a"  "name" "hualei"
dic_r "a"  "name"
dic_u "a"  "name" "ymc"
dic_d "a"  "name"

how to use for developer?

# get the code

# run test
./src/test.sh
#2 get some fail test
#./test.sh | grep "it is false"

author

yemiancheng ymc.github@gmail.com

license

MIT

About

some function for handle dic for ymc shell lib

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages