0
我想在我的for循環中讀取分區和複製因子作爲參數我該怎麼做?而不是2和3,我想從rf中讀取並分割原始好壞的相應值。在shell中讀取for循環中的多個參數
topics=(raw good bad)
rf=(4 6 8)
partition=(2 3 4)
for topic in ${topics[*]}
do
bin/kafka-topics.sh --create --replication-factor 2 --partitions 3 --topic "$topic" --zookeeper $zk_hosts
done
要清楚,它會,例如' - 複製因子4 - 部分2 - 主題原始'和' - 複製因子6 - 部分3 - 主題好'? – chepner