Skip to content

Instantly share code, notes, and snippets.

@ylt6
Created December 24, 2018 14:13
Show Gist options
  • Save ylt6/b2eef02f593e1c3c1342a3c6a0aeb257 to your computer and use it in GitHub Desktop.
Save ylt6/b2eef02f593e1c3c1342a3c6a0aeb257 to your computer and use it in GitHub Desktop.
simple_kv_store.sh
#!/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