linux把一列数据转换成多列

样例

cat demo.txt 
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z

命令

把一列数据转换成3列;xargs最多支持10列

cat demo.txt | xargs  -n3
a b c
d e f
g h i
j k l
m n o
p q r
s t u
v w x
y z

转载于:https://blog.51cto.com/jinkcloud/2410045

猜你喜欢

转载自blog.csdn.net/weixin_34082695/article/details/93092043