Skip to content

Instantly share code, notes, and snippets.

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