[英]Sed command in bash script
I work with bash script . 我使用bash脚本。 I have simple text 我有简单的文字
22
80
880
and I want to get this "22,80,880" using .Can enybody help me? 我希望得到这个“22,80,880”使用。可以帮助我吗?
最简单的方法是使用tr
(“翻译字符”)实用程序 ,告诉它将换行符转换为逗号:
tr '\n' , < input_file > output_file
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.