题解 | #格式化输出#
格式化输出
https://www.nowcoder.com/practice/d91a06bfaff443928065e611b14a0e95
#!/bin/bash
awk -F "" '{
for(i=1;i<=NF;i++){
printf "%s",$i;
if((NF-i)%3==0 && i<NF){
printf "%s",","
}
}
printf "\n"
}' nowcoder.txt
查看16道真题和解析