[root@linuxcool ~]# echo "FirstXSecondXThirdXFourthXFifth" | xargs -dX
First Second Third Fourth Fifth
指定字符X为定界符,以多行形式输出文本内容,每行显示两段内容值:
[root@linuxcool ~]# echo "FirstXSecondXThirdXFourthXFifth" | xargs -dX -n 2
First Second
Third Fourth
Fifth
设定每一次输出信息时,都需要用户手动确认后再显示到终端界面:
[root@linuxprobe ~]# echo "FirstXSecondXThirdXFourthXFifth" | xargs -dX -n 2 -p
echo First Second ?...y
First Second
echo Third Fourth ?...y
Third Fourth
echo Fifth
?...y
Fifth
由xargs调用执行执行的命令,并将结果输出到终端界面:
[root@linuxcool ~]# ls | xargs -t -I{} echo {}
echo anaconda-ks.cfg
anaconda-ks.cfg
echo Desktop
Desktop
echo Documents
Documents
echo Downloads
Downloads
echo initial-setup-ks.cfg
initial-setup-ks.cfg
echo Music
Music
echo Pictures
Pictures
echo Public
Public
echo Templates
Templates
echo Videos
Videos