Skip to content

Instantly share code, notes, and snippets.

@sajjadanwar0
Forked from arsperger/redis_import_csv.txt
Created December 1, 2022 12:48
Show Gist options
  • Save sajjadanwar0/4929a0b8a64ed5304aeb702513cbb12c to your computer and use it in GitHub Desktop.
Save sajjadanwar0/4929a0b8a64ed5304aeb702513cbb12c 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