2、多行时
[root@Master1 ~]# cut -d: -f1 < /etc/passwd | head -n3
root
bin
daemon
[root@Master1 ~]# cut -d: -f1 < /etc/passwd | head -n3 |xargs echo -n
root bin daemon[root@Master1 ~]#
[root@Master1 ~]# cut -d: -f1 < /etc/passwd | head -n3 |xargs echo -n |sed 's/[[:space:]]//g'
rootbindaemon[root@Master1 ~]#
[root@Master1 ~]#
发表评论