|
rivaldo
新手上路

积分 10
发帖 3
注册 2006-4-12
状态 离线
|
『楼 主』:
【求助】 | 管道命令的用法
使用 LLM 解释/回答一下
有搜索了一下。可是好像讲的都不是很清楚 。好像是前一个的输出为后一个的输入的作用吧。
有哪位大大帮忙讲清楚一下。最好是有例子。方便理解。小弟先谢了
I have searched, but it seems that the explanations are not very clear. It seems that the output of the previous one serves as the input of the next one.
Is there any expert who can help explain it clearly? It's better to have examples for easy understanding. Little brother thanks in advance.
|
|
2006-4-12 23:26 |
|
|
hxj
中级用户
  
积分 377
发帖 66
注册 2005-4-4
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
以下是别人改写boot.ini的批处理,其中的 | 用法一看就能理解了。
如果没有 | 前面的结果,| 后面的就无法实现了。
@echo off
type boot.ini>boot.bak
attrib -h -r -s boot.ini
type boot.bak|find "boot loader" /i>boot.ini
echo timeout=5 >>boot.ini
type boot.bak|find "boot loader" /i /v|find "timeout" /i /v>>boot.ini
attrib +s +r +h boot.ini
Last edited by hxj on 2006-4-13 at 02:37 ]
The following is a batch script that someone modified the boot.ini. The usage of the | can be easily understood at a glance.
If there is no result before the |, the part after the | cannot be realized.
@echo off
type boot.ini>boot.bak
attrib -h -r -s boot.ini
type boot.bak|find "boot loader" /i>boot.ini
echo timeout=5 >>boot.ini
type boot.bak|find "boot loader" /i /v|find "timeout" /i /v>>boot.ini
attrib +s +r +h boot.ini
Last edited by hxj on 2006-4-13 at 02:37 ]
|
|
2006-4-13 02:32 |
|
|
chenhui530
高级用户
   
积分 772
发帖 273
注册 2004-10-23
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
何必这么麻烦直接用echo就可以完成
Why go to so much trouble? You can just use echo to do it.
|

http://www.msfans.net/bbs/ |
|
2006-4-13 09:18 |
|
|
rivaldo
新手上路

积分 10
发帖 3
注册 2006-4-12
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
呵呵。谢谢2楼的。3楼的是什么意思呢?
Hehe. Thanks to the one on the 2nd floor. What does the one on the 3rd floor mean?
|
|
2006-4-13 10:07 |
|
|
rivaldo
新手上路

积分 10
发帖 3
注册 2006-4-12
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
还有一个问题是 |是不是只能用在 more find sort 上啊。其他的可不可以啊。如果可以的话麻烦再给个例子
There is another question: Is | only applicable to more, find, sort? Can it be used elsewhere? If it can, please give an example as well.
|
|
2006-4-13 15:57 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
凡是使用标准输入的命令都可以使用|接收输入,例如最常用的:
echo. | time
echo y | format c:
Any command that uses standard input can use | to receive input. For example, the most commonly used ones:
echo. | time
echo y | format c:
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2006-4-13 18:06 |
|
|
Climbing
铂金会员
       网络独行侠
积分 6962
发帖 2753
注册 2003-4-16 来自 河北保定
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
抱歉,网站速度太慢,刷新了两次,就出现了三个回帖,麻烦版主删除三个多余的回复。自己发的帖子自己竟然不能删除,晕。
Sorry, the website is too slow. I refreshed twice and there were three replies. Please ask the moderator to delete the three redundant replies. I can't delete the post I posted myself. Oh my god.
|

偶只喜欢回答那些标题和描述都很清晰的帖子!
如想解决问题,请认真学习“这个帖子”和“这个帖子”并努力遵守,如果可能,请告诉更多的人!
|
|
2006-4-13 18:18 |
|
|
hxj
中级用户
  
积分 377
发帖 66
注册 2005-4-4
状态 离线
|
|
2006-4-13 18:18 |
|
|
willsort
元老会员
         Batchinger
积分 4432
发帖 1512
注册 2002-10-18
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
Re Climbing:
多余帖已删除,另外,关于 “自己发的帖子自己竟然不能删除” 一事,不知兄是否有尝试在帖子“编辑”页面中勾选“!删除本帖”选项后确认?
|

※ Batchinger 致 Bat Fans:请访问 批处理编程的异类 ,欢迎交流与共享批处理编程心得! |
|
2006-4-15 00:44 |
|