Bash while read 逐行处理 Linux 2023-02-27 阅读时长: 1 分钟 阅读辅助 专注模式 段落导读 英文词首加粗 Bash 1 2 3 4 5 6 7 8 9 10 11 get_pod="NAME READY STATUS RESTARTS AGE pod-a 2/2 Running 0 6h pod-b 2/2 Running 0 5h pod-c 2/2 Running 0 4h pod-d 2/2 Running 0 3h" IFS="\n" while read line; do echo $line; done <<< $get_pod