题解 | #wc + awk + xargs 命令循环输出#
转置文件的内容
http://www.nowcoder.com/practice/2240cd809c8f4d80b3479d7c95bb1e2e
line=$(head -n 1 nowcoder.txt | wc -w) # 获取列数
# awk打印每行,xargs 转置
for (( i = 1; i <= $line; ++i)); do
awk -v j=$i '{print $j}' nowcoder.txt | xargs
done