xargs

bash-3.00# cat f.txt1 2 3 4 5 6 7 8 9 10 11 12 13 14

bash-3.00# cat f.txt | xargs -n 3
1 2 3
4 5 6
7 8 9
10 11 12
13 14
----------------
echo "helloXhelloXhello"
helloXhelloXhello

----------------
echo "helloXhelloXhello" | xargs -d X -n 2
hello hello
hello

----------------
echo 12345 | tr '0-9' '987654321'
87654
echo 87654 | tr '987654321' '0-9'
12345

Comments

Popular posts from this blog

HAproxy logging

teamcity Automatic Agent Start under Linux

NFS mount add in fstab _netdev instead of default | firewall-cmd --list-all