|
xycoordinate
中级用户
  
积分 493
发帖 228
注册 2007-2-16 来自 安徽
状态 离线
|
『楼 主』:
剔除重复行
使用 LLM 解释/回答一下
有1文本
王A 男 340505
王B 男 340503
王A 男 340505
王B 男 340503
王B 男 340503
王C 女 340502
王A 男 340505
想剔除重复行,得到
王A 男 340505
王B 男 340503
王C 女 340502
???????
There is a text:
Wang A male 340505
Wang B male 340503
Wang A male 340505
Wang B male 340503
Wang B male 340503
Wang C female 340502
Wang A male 340505
Want to eliminate duplicate rows, get
Wang A male 340505
Wang B male 340503
Wang C female 340502
???????
|
|
2008-1-14 09:26 |
|
|
jmz573515
银牌会员
    
积分 1212
发帖 464
注册 2006-12-13
状态 离线
|
 『第 2 楼』:
使用 LLM 解释/回答一下
@echo off
for /f "delims=" %%i in (a.txt) do (
findstr /c:"%%i" b.txt 2>nul||echo %%i>>b.txt
)
pause
Last edited by jmz573515 on 2008-1-14 at 09:49 AM ]
```
@echo off
for /f "delims=" %%i in (a.txt) do (
findstr /c:"%%i" b.txt 2>nul||echo %%i>>b.txt
)
pause
```
Last edited by jmz573515 on 2008-1-14 at 09:49 AM ]
|
|
2008-1-14 09:44 |
|
|
xycoordinate
中级用户
  
积分 493
发帖 228
注册 2007-2-16 来自 安徽
状态 离线
|
|
2008-1-14 10:06 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
 『第 4 楼』:
使用 LLM 解释/回答一下
bat
@echo %bg% off&SetLocal EnableDelayedExpansion
for /f "delims=" %%a in (a.txt) do (
if not "!%%a!"=="batch" (
echo\
set %%a=batch
)
)
endlocal
pause
awk
gawk "!a++" a.txt
### bat
@echo %bg% off&SetLocal EnableDelayedExpansion
for /f "delims=" %%a in (a.txt) do (
if not "!%%a!"=="batch" (
echo\
set %%a=batch
)
)
endlocal
pause
### awk
gawk "!a++" a.txt
|
|
2008-1-14 18:26 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
|
2008-1-14 20:53 |
|
|
honghunter
中级用户
  
积分 321
发帖 135
注册 2007-2-4
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
Originally posted by HAT at 2008-1-14 08:53 PM:
sort
sort -u a.txt
你说的这个,不是win下的吧,我看win XP下的sort好像就没有-u这个参数。
Originally posted by HAT at 2008-1-14 08:53 PM:
sort
sort -u a.txt
What you said is not for Windows, I see that the sort in Windows XP seems to not have the -u parameter.
|

探讨批量下载与智能化的下载 |
|
2008-1-14 21:12 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
Originally posted by honghunter at 2008-1-14 09:12 PM:
你说的这个,不是win下的吧,我看win XP下的sort好像就没有-u这个参数。
对
看见斑竹提到了awk于是就想到了sort呵呵
Originally posted by honghunter at 2008-1-14 09:12 PM:
What you mentioned is not under Windows, I see that the sort in Windows XP does not have the -u parameter.
Yes
Upon seeing the moderator mention awk, I thought of sort呵呵
|
|
2008-1-14 21:58 |
|
|
zyz0304360
中级用户
   稳
积分 257
发帖 123
注册 2008-1-5 来自 烟台
状态 离线
|
|
2008-1-14 22:08 |
|
|
lixuej
新手上路

积分 10
发帖 4
注册 2008-1-14
状态 离线
|
|
2008-1-15 09:07 |
|
|
grapeskin
初级用户
 
积分 123
发帖 54
注册 2006-12-1
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
又学了一招,每次来都有收获,呵呵
Learned another trick, every time I come here I gain something, heh heh
|
|
2008-1-15 17:09 |
|
|
moniuming
银牌会员
     永远的菜鸟
积分 1335
发帖 574
注册 2007-11-27 来自 广西
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
版主的echo %bg% off和echo\[%%a]是什么,请问能解释一下吗,同时去掉%bg%和\[]也能正常显示啊
What are the meanings of the moderator's echo %bg% off and echo\? May I ask if they can be explained? Also, it can be displayed normally without removing %bg% and \
|
|
2008-1-22 14:25 |
|
|
NaturalJ0
银牌会员
    
积分 1181
发帖 533
注册 2006-8-14
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
set %%a=batch
这句没看懂
==================
唉,一时没转过转来,看明白了,顶了下老贴.
Last edited by NaturalJ0 on 2008-2-19 at 06:48 PM ]
set %%a=batch
I didn't understand this sentence.
==================
Oh, I didn't get it for a moment, but I figured it out and bumped an old post.
Last edited by NaturalJ0 on 2008-2-19 at 06:48 PM ]
|
|
2008-2-19 18:43 |
|
|
zerocq
中级用户
  
积分 458
发帖 196
注册 2006-10-5
状态 离线
|
|
2008-2-19 20:47 |
|
|
bobo247
初级用户
 
积分 34
发帖 14
注册 2008-2-18
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
没看懂,谁帮忙解释一下
"!%%a!"是什么意思
It seems that "!%%a!" might be a specific custom-defined placeholder or an identifier with no universal standard meaning in a general sense. Without more context from the specific context of the China DOS Union forum where this appears, it's difficult to give an extremely precise interpretation. It could be something related to a particular script, macro, or local convention within that forum's discussions.
|
|
2008-2-20 09:47 |
|
|
ansipeter
中级用户
   替身
积分 269
发帖 130
注册 2007-3-23
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
严格的来说,二楼如果加上/X参数就更好了
Strictly speaking, it would be better if the second floor added the /X parameter
|

*讨厌的9527* |
|
2008-2-20 11:48 |
|