填空题
用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
填空题
为文件scores.csv添加一列,列名为GP,该列的值为数学成绩(权重50%)、物理成绩(权重25%)和化学成绩(权重25%)加权和$ cat scores.csvName,Maths,Physics,ChemistryBlue,67,46,99Lin,78,83,80Er,56,79,92Cy,97,98,95Ort,68,72,66Ith,100,100,100$ awk ____________________ scores.csvName,Maths,Physics,Chemistry,GPBlue,67,46,99,69.75Lin,78,83,80,79.75Er,56,79,92,70.75Cy,97,98,95,96.75Ort,68,72,66,68.5Ith,100,100,100,100
套餐购买该问题答案仅对会员开放,欢迎开通会员 ¥ 19.9
0.64/天
1个月(不限次)
¥ 19.9
1000次
(不限时)
¥ 29.9
0.32/天
3个月(不限次)
¥ 59.9
0.16/天
1年(不限次)
立即支付