Created
December 24, 2018 14:13
-
-
Save ylt6/b2eef02f593e1c3c1342a3c6a0aeb257 to your computer and use it in GitHub Desktop.
simple_kv_store.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
db_set() {echo "$1,$2" >> database} | |
db_get() {grep "^$1," database | sed -e "s/^$1,//" | tail -n 1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment