Skip to content

Instantly share code, notes, and snippets.

@RyanKor
Created November 19, 2023 01:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RyanKor/7947636d8649a7380c1d061cc2d7fc44 to your computer and use it in GitHub Desktop.
Save RyanKor/7947636d8649a7380c1d061cc2d7fc44 to your computer and use it in GitHub Desktop.
simple db code
#!/bin/bash
db_set(){
echo "$1,$2" >> database
}
db_get(){
grep "$1^," database | sed -e "s/^$i, //" | tail -n 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment