|
kidzgy
中级用户
  
积分 262
发帖 129
注册 2007-7-11
状态 离线
|
『楼 主』:
怎么给批处理每行末尾添加 >nul 2>nul
使用 LLM 解释/回答一下
有些太不方便了,但又不想要它显示,只能行行手动加上 >nul 2>nul
记住是: " >nul 2>nul"
不包括双引号,但是前头有个空格,是避免与命令连在一起起冲突的。
怎么样将某个cmd 或是bat 拉到这个批处理图标上,就自动实现给每一行末尾都加上 >nul 2>nul
记住哦,是要拉到图标上去就实现了的,而不是先运行批处理,输入路径的。
命令之后新建另一个文件。避免覆盖源文件。
It's a bit too inconvenient, but if you don't want it to display, you can only manually add " >nul 2>nul" to each line. Remember: " >nul 2>nul" (excluding the double quotes, but there's a space in front to avoid conflicts with the command. How to drag a certain cmd or bat to this batch processing icon to automatically add " >nul 2>nul" to the end of each line. Remember, it's to be achieved by dragging to the icon, not by running the batch processing first and entering the path. Create another file after the command to avoid overwriting the source file.
|
|
2008-9-9 19:16 |
|
|
hackate
中级用户
  
积分 228
发帖 125
注册 2008-8-25
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
不知道你是不想让他显示什么?
@echo off
可以不显示运行的命令啊。
只是有的执行结果需要>nul 2>nul
并没有都要>nul2 >nul
I don't know what you don't want him to display?
@echo off
You can not display the running commands.
Only some execution results need >nul 2>nul
Not all need >nul2 >nul
|
|
2008-9-9 19:40 |
|
|
hackate
中级用户
  
积分 228
发帖 125
注册 2008-8-25
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
还有.无法实现说把文件扔到批处理的图标上就能实现你要的结果的。好象是做不到的.
不过你可以打开批处理.然后把你要处理的文件拉到批处理里面,这样倒是可以做到.呵呵
Also. It's impossible to achieve the result by throwing the file onto the batch processing icon. It seems it can't be done.
But you can open the batch processing and then drag the file you want to process into the batch processing. That can be done. Hehe
|
|
2008-9-9 19:43 |
|
|
s11ss
银牌会员
    
积分 2098
发帖 566
注册 2007-9-11
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
@for /f "usebackq eol=" %%a in ("%~f1") do @echo %%a ^>nul 2^>nul>> "%~dp1_%~nx1"
@for /f "usebackq eol=" %%a in ("%~f1") do @echo %%a ^>nul 2^>nul>> "%~dp1_%~nx1"
|
|
2008-9-9 19:49 |
|
|
metoo
初级用户
 
积分 195
发帖 93
注册 2006-10-28
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
用带正则的编辑器。。比如ep
替换——勾选正则表达式——
$
空格>nul 2>nul
完成
Use an editor with regular expressions, such as EP. Replace - check the regular expression - $ followed by a space >nul 2>nul. Done
|
|
2008-9-9 22:32 |
|
|
kidzgy
中级用户
  
积分 262
发帖 129
注册 2007-7-11
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
2楼,此言差异!
用reg命令会提示操作成功,这就有显示了
4楼的不行。
2nd floor, that's a wrong statement!
Using the reg command will prompt that the operation is successful, and then it will be displayed.
The 4th floor doesn't work.
|
|
2008-9-10 19:41 |
|
|
hackate
中级用户
  
积分 228
发帖 125
注册 2008-8-25
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
不好意思,我菜都不知道这样可以..
不过4楼的方法的确可以啊。怎么说不行捏?
你那里出错了吗?不然我这里测试通过啊。
I'm sorry, I didn't even know this could be done..
But the method on the 4th floor really works. Why do you say it doesn't work?
Did you make a mistake there? Otherwise, it passed my test here.
|
|
2008-9-10 20:06 |
|
|
HAT
版主
       
积分 9023
发帖 5017
注册 2007-5-31
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
Q: 为什么不行啊?
A: 去电线杆上找个老军医的手机,他是专治+包治这个的。如果治疗周期较长,建议列出你的测试环境、测试用例、出错信息,供大家帮助你解决问题。
Q: Why doesn't it work?
A: Find an old military doctor's phone on the utility pole. He specializes in and cures this. If the treatment cycle is long, it is recommended to list your test environment, test cases, and error messages for everyone to help you solve the problem.
|

 |
|
2008-9-10 20:33 |
|
|
airstop
初级用户
 
积分 24
发帖 12
注册 2008-9-8
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
没有听过可以这样的,太神奇了
Haven't heard of it being possible like this, it's too amazing
|
|
2008-9-10 22:38 |
|
|
kidzgy
中级用户
  
积分 262
发帖 129
注册 2007-7-11
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
你在BAT里写着taskkill /im explorer.exe /f
然后保存拉进去看看就知道了~
You write taskkill /im explorer.exe /f in the BAT, then save it and drag it in to see it~
|
|
2008-9-11 19:11 |
|
|
hackate
中级用户
  
积分 228
发帖 125
注册 2008-8-25
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
希望你把你的代码贴出来,这样好分析情况..
OK?
Please provide the specific code that needs to be translated. Since you haven't provided the code content yet, please paste the relevant code here.
|
|
2008-9-11 20:23 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
batch.cmd >nul 2>nul
batch.cmd >nul 2>nul
|

49206C6F766520796F752067757973 54656C3A3133383238343036373837 |
|
2008-9-11 22:45 |
|
|
kidzgy
中级用户
  
积分 262
发帖 129
注册 2007-7-11
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
源文件代码:
taskkill /im explorer.exe /f
转换之后:
taskkill >nul 2>nul
The original Chinese text is about code conversion. The first code is `taskkill /im explorer.exe /f` and the converted one is `taskkill >nul 2>nul`. Since the task is just to present the conversion result as required, the translated result is:
taskkill >nul 2>nul
|
|
2008-9-12 17:03 |
|
|
s11ss
银牌会员
    
积分 2098
发帖 566
注册 2007-9-11
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
Originally posted by kidzgy at 2008-9-12 05:03 PM:
源文件代码:
taskkill /im explorer.exe /f
转换之后:
taskkill >nul 2>nul
改为:
@for /f "usebackq eol= delims=" %%a in ("%~f1") do @echo %%a ^>nul 2^>nul>> "%~dp1_%~nx1"
Last edited by s11ss on 2008-9-12 at 05:13 PM ]
Originally posted by kidzgy at 2008-9-12 05:03 PM:
Source file code:
taskkill /im explorer.exe /f
After conversion:
taskkill >nul 2>nul
Change to:
@for /f "usebackq eol= delims=" %%a in ("%~f1") do @echo %%a ^>nul 2^>nul>> "%~dp1_%~nx1"
Last edited by s11ss on 2008-9-12 at 05:13 PM ]
|
|
2008-9-12 17:07 |
|
|
kidzgy
中级用户
  
积分 262
发帖 129
注册 2007-7-11
状态 离线
|
|
2008-9-12 19:27 |
|