Skip to content

Instantly share code, notes, and snippets.

@ilovefood2
Forked from arsperger/redis_import_csv.txt
Created September 20, 2019 06:32
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 ilovefood2/655b85cc37392a48aaa88310c7e6d7dd to your computer and use it in GitHub Desktop.
Save ilovefood2/655b85cc37392a48aaa88310c7e6d7dd to your computer and use it in GitHub Desktop.
import csv file into redis with a single command
cat data.csv | awk -F',' '{print " SET \""$1"\" \""$2"\" \n"}' | redis-cli --pipe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment