@echo off: g5 P+ D/ L4 I! P) L
setlocal enabledelayedexpansion }. h2 T5 g- q+ V) `, \, v
for /f "tokens=*" %%i in ('type 1.txt') do (
' l/ o$ a! `2 F$ E+ j7 X set text=%%i
3 Z! O, Q0 |# Z9 b( {& o0 R set size=0
4 _/ ^- ]- v" v* _ B& ^- _9 t: V for %%a in (G21 G18 G50 G96) do (
' k5 @/ L2 q% X# v9 k if /i "!text:~0,3!" == "%%a" (# \- g' \, a2 W
set size=1* R& w1 X/ [/ {
)# Z4 Z' J* _5 ?) W1 a, V! ]
). V# Q7 b" J: Q7 v" { q0 ^
if "!text:~0,1!" == "(" (set size=1)6 E3 K8 }1 g0 \& m( n4 y
if !size! == 0 (" V3 }, w) Z" S% E: i; y
echo %%i >>2.txt+ `' e, {; z8 O* ]% _0 R, W. y0 ^
)7 N k4 T' Q! Z( b" | u7 e8 q, D
)
" T, ~* `9 ?2 r) r& q- e: i$ npause8 u" w/ p. r h2 }: }+ Y' X
|