0
我有以下bash代碼,並希望將該字符串轉換爲傳遞給不同程序的命令行參數。BASH: - 將字符串解析爲單獨的命令行參數
所以我GETVARS,想分裂,這樣做
./somecommand $ GETVARS [0] $ GETVARS [1]
等
GETVARS將任何隨機長度的元素。
GETVARS = ""
for id in {100..500..10}
do
for letter in A B C D E F
do
GETVARS=$GETVARS"\":${id}:${letter}\" "
done
done
//GETVARS = "":100:A" "100:B" "100:C"" .. and so on
謝謝!那是我需要的 – user3896519