当前位置:网站首页>shell脚本读取文本中的redis命令批量插入redis
shell脚本读取文本中的redis命令批量插入redis
2022-07-27 14:22:00 【不与天斗姜大夫】
#!/bin/bash
if [ "$#" -lt 1 ]
then
echo "Usage: $0 [filename] [host] [port]"
exit 1
fi
filename=${1}
host=${2}
port=${3}
while read line
do
echo $line | redis-cli -h $2 -p $3 -c
sleep 0.005
done < $filename
使用方式
sh import.sh bitfield_commands.txt 127.0.0.1 8888
如果需要输出日志到文本
sh import.sh bitfield_commands.txt 127.0.0.1 8888 > import.log 2>&1
边栏推荐
- 积分运算电路的设计方法详细介绍
- Principle of MOS tube to prevent reverse connection of power supply
- 3.3-5v转换
- Notice of Shenzhen Municipal Bureau of human resources and social security on the issuance of employment related subsidies for people out of poverty
- Simple mathematical knowledge related to 3D
- Network equipment hard core technology insider router Chapter 5 tompkinson roaming the network world (Part 1)
- 华为鸿蒙模拟器去除顶部导航栏方法
- 资本频频加码,急于上市的和府捞面有多“疯狂”?
- 微信公众平台开发概述
- 两阶段提交与三阶段提交
猜你喜欢

Unity performance optimization ----- LOD (level of detail) of rendering optimization (GPU)

3.3-5v conversion

Basic usage of kotlin

EMC design scheme of RS485 interface

西瓜书《机器学习》阅读笔记之第一章绪论

Code coverage statistical artifact -jacobo tool practice

反射

JUC(JMM、Volatile)

Unity性能优化------渲染优化(GPU)之LOD(Level of detail)

What is the breakthrough point of digital transformation in the electronic manufacturing industry? Lean manufacturing is the key
随机推荐
USB interface electromagnetic compatibility (EMC) solution
STM32 can communication filter setting problem
Leetcode-1737- minimum number of characters to change if one of the three conditions is met
TCC
Do you really understand CMS garbage collector?
网络设备硬核技术内幕 路由器篇 11 CISCO ASR9900拆解 (五)
Design scheme of digital oscilloscope based on stm32
LeetCode 341.扁平化嵌套列表迭代器 dfs,栈/ Medium
DIY制作示波器的超详细教程:(一)我不是为了做一个示波器
DevEco Studio2.1运行项目报错
JUC(JMM、Volatile)
IJCAI 2022 outstanding papers were published, and 298 Chinese mainland authors won the first place in two items
Network equipment hard core technology insider router Chapter 9 Cisco asr9900 disassembly (II)
3.3-5v转换
LeetCode 81. 搜索旋转排序数组 II 二分/medium
网络设备硬核技术内幕 路由器篇 3 贾宝玉梦游太虚幻境 (中)
Is it safe to open an account on a mobile phone?
网络设备硬核技术内幕 路由器篇 14 从鹿由器到路由器 (中)
Sword finger offer cut rope
2022-07-27日报:IJCAI 2022杰出论文公布,大陆作者中稿298篇拿下两项第一