http://www.fpcu.jp/dosvcmd/bbs/log/unixdoswindows/3-0062.html
cmd.exeã®ã·ã§ã«ã¹ã¯ãªããâ¦â¦ã¤ã¾ããããã(bat)ãã¡ã¤ã«ã§å®ç¾ã§ãããããã
注æç¹ã¨ãã¦ã空è¡ã®ã¿ã®ãã¡ã¤ã«ãæ£å¸¸ã«å¦çãããªã(ä½ãåºåãããªã)ã¨ããç´ æ´ãããã§ãã
@echo off
rem --------------------------------------uniq.bat
set prev=
if not exist "%1" goto error
for /f "tokens=* delims=" %%L in ( %1 ) do call :sub %%L
goto exit
:sub
if not "%prev%"=="%*" set prev=%*&&echo %*
goto :EOF
:error
echo.
echo 表示ããããã¡ã¤ã«åãæå®ãã¦ãã ããã
echo [ä¾] uniq.bat file.txt
echo.
:exit
å®é使ã£ã¦ã¿ãã¨ãæ¨æºå
¥åããåãåããªãã£ããã¨çµæ§å¶éãå¤ãã£ãããããã
ã§ããwindowsæ¨æºç°å¢ã®ã¿ã§å®ç¾ã§ããã£ã¦ç¹ã¯å¤§ããã