linux下怎么把一行數(shù)據(jù)變成一列?
用xargs -n1
格式:
echo XXX XXX XXX |xargs -n1
[root@zabbix ~]# echo the squid project provides a number of resources toassist users design|xargs -n1
the
squid
project
provides
a
number
of
resources
toassist
users
design
并且xargs可以去掉換行符
怎么把一列數(shù)據(jù)變?yōu)橐恍?
格式:
xxxx(你的命令)| xargs
[root@zabbix ~]# cat lie.txt
of
resources
toassist
users
design,implement
and
support
squid
[root@zabbix ~]# cat lie.txt |xargs
of resources toassist users design,implement and support squid