例:把p.txt中的一行,分隔爲多行,每行6個字符。ide
[root@localhost ~]# cat /p.txt 784ce9e5e1cbb548c125a152df0143f346a6d9a4ee807fdc1cd33919b797554c4030b461e97c39f8dba9cd4670806886a74e240fa4b8a979bdd07164c9e89780ae5ed557013e91acefeffc09ce0c11a5bb
[root@localhost ~]# sed 's/....../&\n/g' /p.txt
784ce9
e5e1cb
b548c1
25a152
df0143
f346a6
d9a4ee
807fdc
1cd339
19b797
554c40
30b461
e97c39
f8dba9
cd4670
806886
a74e24
0fa4b8
a979bd
d07164
c9e897
80ae5e
d55701
3e91ac
efeffc
09ce0c
11a5bbit