The syntax of the script is incorrect. The correct syntax is:

for i in {8001..8003}; do redis-cli -h 127.0.0.1 -p $i -a test123 --no-auth-warning FLUSHALL & done

Note the semicolon after the range expression and the space before the do keyword.

./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'

原文地址: https://www.cveoy.top/t/topic/AF3 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录