题解 | #将字段逆序输出文件的每行#
将字段逆序输出文件的每行
https://www.nowcoder.com/practice/e33fff83fd384a21ba67f3104fb8d646
#!/bin/bash #有点难,仅供参考 cat nowcoder.txt | awk -F ":" '{for(lno=NF;lno>0;lno--) { print $lno;} }' | xargs -n 8 | tr -s " " ":" | sed "s/:/ /3"
将字段逆序输出文件的每行
https://www.nowcoder.com/practice/e33fff83fd384a21ba67f3104fb8d646
#!/bin/bash #有点难,仅供参考 cat nowcoder.txt | awk -F ":" '{for(lno=NF;lno>0;lno--) { print $lno;} }' | xargs -n 8 | tr -s " " ":" | sed "s/:/ /3"
相关推荐