Content #
$ echo “This, is, a, test, to, remove, commas.” | > sed -n ‘{ > :start > s/,//1p > t start > }’ This is, a, test, to, remove, commas. This is a, test, to, remove, commas. This is a test, to, remove, commas. This is a test to, remove, commas. This is a test to remove, commas. This is a test to remove commas. $ 当没有逗号可替换时,测试命令不再跳转,而是继续执行剩下的脚本(在本例中,也就是结束脚本)。
From #
Linux命令行与shell脚本编程大全