程式碼示例:
@echo off
cd.>測試檔案.x
for /f "delims=" %%i in ("dir /b/s *.txt") do (
sed "s/.\(key[1-2]\)/\n\1/g" "%%i" | sed -n "/key[1-2]/p"
)>> 測試檔案.x
start 測試檔案.x
exit /b
for /f "delims=" %%i in ("dir /b/s *.html *.txt") do (
sed -n "/<table[^>]*>/,/<\/table>/p" "%%i"
) >> 測試檔案.x
程式碼示例:
@echo off
cd.>測試檔案.x
for /f "delims=" %%i in ("dir /b/s *.txt") do (
sed "s/.\(key[1-2]\)/\n\1/g" "%%i" | sed -n "/key[1-2]/p"
)>> 測試檔案.x
start 測試檔案.x
exit /b
@echo off
cd.>測試檔案.x
for /f "delims=" %%i in ("dir /b/s *.html *.txt") do (
sed -n "/<table[^>]*>/,/<\/table>/p" "%%i"
) >> 測試檔案.x
start 測試檔案.x
exit /b