Skip to content

Instantly share code, notes, and snippets.

@francjohny
Created April 29, 2018 08:17
Show Gist options
  • Save francjohny/b57756a1e0124dd562959ca5ece2a32b to your computer and use it in GitHub Desktop.
Save francjohny/b57756a1e0124dd562959ca5ece2a32b to your computer and use it in GitHub Desktop.
Redis Mass Insertion Script - Mac OS
#!/usr/bin/env bash
readonly FILE=$1
readonly HOST=$2
perl -p -e 's|[\r\n]+|\r\n|g' ${FILE} | redis-cli --pipe -h ${HOST}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment