Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有类似的文件
aaaaa, aa 1 bbbbb, bb2 cccccccc, ccc 3/2
我想要逗号分隔的值,这意味着类似
aaaaa aa 1
在第一次迭代中
bbbbb bb2
在第二次迭代中,依此类推
有人能帮我吗?
谢谢
while IFS=, read one two; do echo "$one" # aaaaa on first iteration echo "$two" # aa 1 on first iteration done < input-file