标签: bash shell
美好的一天,
我想知道如果他们之间只有一个单一的空间,如何加入单词
实施例
this not work this work
获取
this not work this_work
非常感谢。
答案 0 :(得分:3)
您可以使用awk:
awk
$ awk 'NF==2{sub(/ /,"_")}1' file this not work this_work
_