China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

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!

中国DOS联盟论坛
The time now is 2026-08-05 20:23
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How should this line <"%~f0" more +6 >1.txt be explained? View 748 Replies 3
Original Poster Posted 2007-09-05 20:46 ·  中国 北京 海淀区 联通
银牌会员
★★★
Credits 1,287
Posts 634
Joined 2007-05-02 15:06
19-year member
UID 87277
Gender Male
From cmd.exe
Status Offline
@echo off
chcp 437>nul&&graftabl 936>nul
ren %WinDir%\System32\config.nt config.nt.bak 2>nul
<"%~f0" more +6 >%WinDir%\System32\config.nt
command /cecho electroniXtar
pause>nul&exit
DOSONLY
dos=high, umb
device=%SystemRoot%\system32\himem.sys
DEVICE==%SystemRoot%\System32\ANSI.SYS /x
files=40

How should
<"%~f0" more +6 >%WinDir%\System32\config.nt
be explained?


Also:
>>%temp%\reglist.txt echo ================================================================
and
echo ================================================================>>%temp%\reglist.txt
is there any difference?



Does putting this kind of redirection symbol in front have any meaning?
Floor 2 Posted 2007-09-11 23:53 ·  中国 山西 太原 万柏林区 电信
初级用户
Credits 49
Posts 26
Joined 2007-09-11 15:38
18-year member
UID 97109
Gender Male
Status Offline
I want to know too, helping you bump the thread
Floor 3 Posted 2007-09-12 07:46 ·  中国 香港 腾讯云
银牌会员
★★★
Credits 1,928
Posts 931
Joined 2007-01-06 11:46
19-year member
UID 75624
Gender Male
Status Offline
<"%~f0" more +6 >%WinDir%\System32\config.nt
is equivalent to

more +6<"%~f0" >%WinDir%\System32\config.nt

It means skipping the first 5 lines of the P file and displaying the file starting from the sixth line
Floor 4 Posted 2007-09-12 09:36 ·  中国 山西 太原 万柏林区 电信
初级用户
Credits 49
Posts 26
Joined 2007-09-11 15:38
18-year member
UID 97109
Gender Male
Status Offline
Thanks, wudixin96
Learned something
Forum Jump: