|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 31 楼』:
使用 LLM 解释/回答一下
如果你有your_file这个文件,就把这个命令里面your_file前面的单引号去掉。
If you have the file named your_file, remove the single quotes before your_file in this command.
|
|
2008-9-16 21:05 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 32 楼』:
使用 LLM 解释/回答一下
gawk "{for (i=1;i<=NF;i++) { if($i~/^5-/){ split($i,a,/-/); if(a>max) max=a; }}} END{print max}" "a.txt"
```gawk "{for (i=1;i<=NF;i++) { if($i~/^5-/){ split($i,a,/-/); if(a>max) max=a; }}} END{print max}" "a.txt"
```
|

 |
|
2008-9-16 21:13 |
|
|
dragonamd
中级用户
  
积分 209
发帖 100
注册 2008-8-1
状态 离线
|
『第 33 楼』:
使用 LLM 解释/回答一下
可以用了,能标志一下意思吗 ?好让我自己学着修改,特别是显示的那段
Last edited by dragonamd on 2008-9-16 at 09:40 PM ]
It works. Can you mark the meaning? So that I can learn to modify it by myself, especially the displayed part.
Last edited by dragonamd on 2008-9-16 at 09:40 PM ]
|
|
2008-9-16 21:39 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 34 楼』:
使用 LLM 解释/回答一下
print max
“显示的那段”就是这里,打印max的值,标志完毕。
ps.不知斑竹是否有哭笑不得的感觉。
print max
The "displayed part" is here, printing the value of max, marking the end.
ps. I don't know if the moderator feels a bit at a loss.
|

 |
|
2008-9-16 21:44 |
|
|
dragonamd
中级用户
  
积分 209
发帖 100
注册 2008-8-1
状态 离线
|
『第 35 楼』:
使用 LLM 解释/回答一下
HAT大哥,我是很菜,但我在努力学习,难道就这样笑话新人吗 ?至少在P处理方面学到很多了,不管怎么样都要谢谢你们
print max 这段我换了行就不能显示,。因为我想把标记放到别处去
Brother HAT, I'm really a newbie, but I'm trying to learn. Do you have to make fun of newbies like this? At least I've learned a lot in terms of P processing. Anyway, I should thank you all. The line break in the "print max" part makes it not display. Because I want to put the mark somewhere else.
|
|
2008-9-16 21:49 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 36 楼』:
使用 LLM 解释/回答一下
这个,我没有笑话任何人的意思,造成了不比要的误会,抱歉。
我的意思是,斑竹已经回答的很清楚了,让你把your_file改成自己的文件名,建议看回过头再看看斑竹的回答。
//print max 这段我换了行就不能显示,。因为我想把标记放到别处去
我很笨,看不懂什么意思,能否把你修改后的代码贴出来看看?
This, I have no intention of laughing at anyone, and I caused unnecessary misunderstandings. Sorry.
What I mean is that the moderator has answered very clearly, asking you to change your_file to your own file name. It is suggested to look back at the moderator's answer.
//print max I can't display it after changing lines. Because I want to put the mark elsewhere
I'm very stupid and don't understand what it means. Can you post the modified code you have to take a look?
|

 |
|
2008-9-16 21:58 |
|
|
dragonamd
中级用户
  
积分 209
发帖 100
注册 2008-8-1
状态 离线
|
『第 37 楼』:
使用 LLM 解释/回答一下
gawk "{for (i=1;i<=NF;i++) { if($i~/^5-/){ split($i,a,/-/); if(a>max) max=a; }}} END{print max}" "a.txt"
@echo %NewFile% %ste% %sty% %max% 我想把很多变量放在一起显示
Last edited by dragonamd on 2008-9-17 at 12:43 AM ]
gawk "{for (i=1;i<=NF;i++) { if($i~/^5-/){ split($i,a,/-/); if(a>max) max=a; }}} END{print max}" "a.txt"
@echo %NewFile% %ste% %sty% %max% I want to display many variables together
Last edited by dragonamd on 2008-9-17 at 12:43 AM ]
|
|
2008-9-16 22:04 |
|
|
dragonamd
中级用户
  
积分 209
发帖 100
注册 2008-8-1
状态 离线
|
『第 38 楼』:
使用 LLM 解释/回答一下
帮帮我好吗 ? 对这个实在不懂了,刚才看了网上很教程,都没提到这段
Can you help me? I really don't understand this. I just looked at a lot of online tutorials, and none of them mentioned this part.
|
|
2008-9-17 00:44 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 39 楼』:
使用 LLM 解释/回答一下
这样试试看
gawk "{for (i=1;i<=NF;i++) { if($i~/^5-/){ split($i,a,/-/); if(a>max) max=a; }}} END{print max}" "a.txt" > %temp%\tmp.p
set /p max=<%temp%\tmp.p
echo max 的值为 .
Try this way
gawk "{for (i=1;i<=NF;i++) { if($i~/^5-/){ split($i,a,/-/); if(a>max) max=a; }}} END{print max}" "a.txt" > %temp%\tmp.p
set /p max=<%temp%\tmp.p
echo max 的值为 .
|
|
2008-9-17 07:48 |
|
|
dragonamd
中级用户
  
积分 209
发帖 100
注册 2008-8-1
状态 离线
|
『第 40 楼』:
使用 LLM 解释/回答一下
斑竹的办法是把值写入到临时,再读取对吗?
Is the moderator's method to write the value to a temporary one and then read it?
|
|
2008-9-17 09:28 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 41 楼』:
使用 LLM 解释/回答一下
Originally posted by dragonamd at 2008-9-17 09:28:
斑竹的办法是把值写入到临时,再读取对吗?
嗯,有什么问题吗?
Originally posted by dragonamd at 2008-9-17 09:28:
Is the moderator's method to write the value to a temporary and then read it?
Hmm, is there any problem?
|
|
2008-9-17 18:42 |
|
|
dragonamd
中级用户
  
积分 209
发帖 100
注册 2008-8-1
状态 离线
|
『第 42 楼』:
使用 LLM 解释/回答一下
没有问题,昨天晚上我也想过,但不会写,。效率很高,努力学习
No problem. I also thought about it last night, but I couldn't write it. The efficiency is very high, and I will study hard.
|
|
2008-9-17 20:49 |
|