-
Notifications
You must be signed in to change notification settings - Fork 1
/
排版.bat
47 lines (47 loc) · 999 Bytes
/
排版.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@echo off
rem 分割每行为9个字符
for /f "delims=" %%i in ('dir /a /b *.txt') do (
gawk -f "E:\批处理\批处理\sed wget curl gawk\gawk\splitlongline.txt" %%i>%%i.txt
)
set /p str= 请选择你要添加的分割线类型[:=~`-.+*_]
if "%str%"=="-" goto a1
if "%str%"==" " goto b1
if "%str%"=="=" goto c1
if "%str%"=="_" goto d1
if "%str%"=="." goto e1
if "%str%"==":" goto f1
if "%str%"=="~" goto g1
goto :eof
:a1
sed -i "/^$/d" *.txt
sed -i "a\---------------" *.txt
pause
exit
:b1
sed -i "/^$/d" *.txt
sed -i "a\-+-+-+-+-+-+-+-" *.txt
pause&exit
:c1
sed -i "/^$/d" *.txt
sed -i "a\==================" *.txt
pause&exit
:d1
sed -i "/^$/d" *.txt
sed -i "a\__________________" *.txt
pause&exit
:e1
sed -i "/^$/d" *.txt
sed -i "a\...................................." *.txt
pause&exit
:f1
sed -i "/^$/d" *.txt
sed -i "a\::::::::::::::::::" *.txt
pause&exit
:g1
sed -i "/^$/d" *.txt
sed -i "a\```````````````````````````" *.txt
pause&exit
:g1
sed -i "/^$/d" *.txt
sed -i "a\~~~~~~~~~~~~~~~~~~~~~~~~~~~" *.txt
pause&exit