Created
November 24, 2019 02:15
-
-
Save andriybuday/31b8345303005c08517befe52cd539c3 to your computer and use it in GitHub Desktop.
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