./dele_all_key.sh: line 3: `for i in {8001..8003} do redis-cli -h 127.0.0.1 -p $i -a test123 --no-auth-warning FLUSHALL & done' 是什么错误,应该怎么修正
这个脚本中缺少分号和换行符,正确的语法应该是:
for i in {8001..8003}; do
redis-cli -h 127.0.0.1 -p $i -a test123 --no-auth-warning FLUSHALL &
done
在每个语句后添加分号,将循环体放在花括号中,并在循环体结束后添加换行符。
原文地址: https://www.cveoy.top/t/topic/AF5 著作权归作者所有。请勿转载和采集!