多行資料放到一行上

czxin788發表於2015-11-10
在linux中,把多行資料放到一行上的做法,用xargs

[root@Cent64JBWBJ3 mysqlmonitor]# cat a.txt
agent
apache-tomcat
a.txt
bin
configuration_report.txt
etc
images
install.log
java
licenses
mysql
mysqlmonitorctl.sh
README_en.txt
README_ja.txt
support-files
uninstall
uninstall.dat
version.txt
[root@Cent64JBWBJ3 mysqlmonitor]# cat a.txt |xargs
agent apache-tomcat a.txt bin configuration_report.txt etc images install.log java licenses mysql mysqlmonitorctl.sh README_en.txt README_ja.txt support-files uninstall uninstall.dat version.txt
[root@Cent64JBWBJ3 mysqlmonitor]# 




來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28916011/viewspace-1826681/,如需轉載,請註明出處,否則將追究法律責任。

相關文章