题目内容
用awk模拟命令”paste -sd,”$ cat addr.txtHello WorldHow are youThis game is goodToday is sunny12345You are funny# 将所有行用逗号','拼接起来$ paste -sd, addr.txtHello World,How are you,This game is good,Today is sunny,12345,You are funny# 请确保合并后行尾没有逗号','且行尾有换行$ awk ____________________ addr.txtHello World,How are you,This game is good,Today is sunny,12345,You are funny$ 如果输入仅有一行,也要确保合并后行尾没有逗号','$ printf 'foo' | paste -sd,foo$ printf 'foo' | awk ____________________foo
查看答案
搜索结果不匹配?点我反馈
更多问题