redis批量导入

cat test.txt
a,1
b,2
c,3
cat test.txt | awk -F "," '{print $1" "$2" "$3" "$4}'
a 1
b 2
c 3
cat ../test.txt | awk -F "," '{print $1" "$2}' | xargs -n4 sh -c 'src/redis-cli set $1 $2' sh
cat ../test.txt | awk -F "," '{print "set "$1" "$2}' | src/redis-cli --pipe
cat ../f0.txt | awk -F "," '{print "set "$1" "$2}' | src/redis-cli --pipe
time cat ../f0.txt | awk -F "," '{print "set "$1" "$2}' | src/redis-cli -n 0 --pipe

标签: none

添加新评论