linux将上一条命令的结果作为下一条命令的参数
1、xargs
[ root@localhost test]
[ root@localhost test]
test10.txt test1.txt test2.txt test3.txt test4.txt test5.txt test6.txt test7.txt test8.txt test9.txt
[ root@localhost test]
test10.txt
test1.txt
test2.txt
test4.txt
test5.txt
test6.txt
test7.txt
test8.txt
test9.txt
[ root@localhost test]
[ root@localhost test]
test3.txt
2、使用反引号
[ root@localhost test]
[ root@localhost test]
aa10.txt aa1.txt aa2.txt aa3.txt aa4.txt aa5.txt aa6.txt aa7.txt aa8.txt aa9.txt
[ root@localhost test]
[ root@localhost test]
aa2.txt
3、使用find exec命令
[ root@localhost test]
aa2.txt
[ root@localhost test]
4、使用$( )
[ root@localhost test]
[ root@localhost test]
db1 db10 db2 db3 db4 db5 db6 db7 db8 db9
[ root@localhost test]
[ root@localhost test]
db2