假设我有一个Unix shell变量,如下所示
variable=abc,def,ghij
我想使用for循环提取所有值(abc,def和ghij)并将每个值传递给过程.
abc
def
ghij
该脚本应允许从中提取任意数量的逗号分隔值$variable.
$variable
unix shell loops for-loop cut
cut ×1
for-loop ×1
loops ×1
shell ×1
unix ×1