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.
我使用 bash 脚本。我有简单的文字
22 80 880
我想用 . 得到这个“22,80,880”。有人能帮我吗?
最简单的方法是使用( tr"translate characters") 实用程序,告诉它将换行符转换为逗号:
tr
tr '\n' , < input_file > output_file