As the title says
Please help me write it
Thanks!!!
Please help me write it
Thanks!!!
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
@echo off
echo Please enter the start date, for example:2007-3-29
set /p d=
echo Please enter the end date, for example:2007-4-29
set /p h=
set /p var=<a.txt
cls
echo %var%
setlocal EnableDelayedExpansion
for /f "delims=" %%i in (a.txt) do (
for /f "tokens=5 delims= " %%a in ("%%i") do (
if not "%%a"=="" (
set num=%%a
set num=!num:年=-!
set num=!num:月=-!
set num=!num:日=!
if !num! geq !d! if !num! leq !h! echo %%i
)))
pause
sed "/^\(]\+]\+\)\{4\}2007年4月20.*/,/^\(]\+]\+\)\{4\}2007年10月20.*/!d" UrTestFile.txt|sed "1d;$d"
| Rater | Score | Time |
|---|---|---|
| junchen2 | +4 | 2007-10-31 08:42 |
Originally posted by 26933062 at 2007-10-30 11:53 PM:
@echo off
echo Please enter the start date, for example:2007-3-29
set /p d=
echo Please enter the end date, for example:2007-4-29
set /p h=
set /p var=<a.txt
cls
echo %var%
setlocal EnableDelayedExpansion
...
set a=2007-4-21
set b=2007-10-21
if %a% lss %b% (echo yes) else echo no
pauseOriginally posted by junchen2 at 2007-10-31 12:55 AM:
echo off
@for /f "tokens=1-6 delims=: " %%a in ('findstr /n " 2007年4月20日 " 111.txt') do (
if "%%f" == "2007年4月20日" set n=%%a& goto 2
)
:2 ...