点击(此处)折叠或打开
-
[oracle@oracle test]$ cat a.txt
-
1
-
2
-
3
-
SERVERID=<SERVERID>
-
4
-
[oracle@oracle test]$ cat b.txt
-
5555
-
<SERVERID>
-
<SERVER_NAME> fdsaf
-
[oracle@oracle test]$ paste a.txt b.txt
-
1 5555
-
2 <SERVERID>
-
3 <SERVER_NAME> fdsaf
-
SE
-
-
-
-
[oracle@oracle test]$ paste -d: a.txt b.txt
-
1:5555
-
2:<SERVERID>
-
3:<SERVER_NAME> fdsaf
-
SERVERID=<SERVERID>:
- 4:
-
--------------------------------------------------
-
-: 这个选项也很有用
-
[oracle@oracle tmp]$ ls
1-200W.csv 3.txt b grade.txt passwd.bak test x
1.awk 5000.csv bnz.txt i p.sed time_cron_test
1.txt 5000.new calc.sh ora quote.txt video.txt
2.txt a fieldcheck.awk passwd.awk result.txt v.txt
[oracle@oracle tmp]$ ls | paste - - -
1-200W.csv 1.awk 1.txt
2.txt 3.txt 5000.csv
5000.new a b
bnz.txt calc.sh fieldcheck.awk
grade.txt i ora
passwd.awk passwd.bak p.sed
quote.txt result.txt test
time_cron_test video.txt v.txt
x
-------------------------------------------------- - -s: 按照行粘贴
- ls | paste -s 所有文件名 合并成一行
-
分割文件大小,一个文件1k 行,默认,例如a.txt 2800 行
split filename
分三个文件: 1k 1k 800 行
split -n filename