|
|
第 16 帖 | |
|
|
是的,home_king说的对。只是这种方法以前没有试过。现在正好有一个问题:如何将一段stdin同时写进几个文件?一个小练习,但是做了半天也没有做出来?不知bash是否能实现。要求是不用循环结构。(当然,用循环就不是问题了。)
比如:有a , b , c ,d 四个空文件,现在想把‘abcd’这段字窜通过一种方法同时并行写入这四个文件。怎么做?能不能实现?(看过home_king兄关于并行管道的大帖后想到的)
__________________
15" C2D MBP. 有简单的,不用复杂的!看到复杂的,尽量简单化! Unix/Linux Philosophy: Be small! Be concentrated! One program does one thing and do it perfectly! ∞ years - 宇宙中最后的物质 Proton heat death. 之后,宇宙将以纯能量的形式永远存在。。。一切皆空 |
|
|
|
|
|
|
|
第 17 帖 | |
|
|
无须使用进程替换。
代码:
如command arg1 arg2 则可以command <(prog1) <(prog2)
__________________
IBOX, a LiveCD distribution based on Gentoo, is fit for newbie. IBOX brings to you: - knoppix-style harddisk installation tool, by which you can install Gentoo in 20 minutes. - hardware auto-configuration. You can run into X desktop directly. - all-round software set, including OpenOffice, azureus. - LiveCD-create-tools. Step-by-step, custom a LiveCD yourself with ease. Any questions and feedbacks is welcome to home_king at 163 dot com 此帖于 04-04-07 12:35 被 home_king 编辑. |
|
|
|
|
|
|
|
第 18 帖 | |
|
|
谢谢了。原来是这样。不知这样的情况是否是并行管道的例子呢?
|
|
|
|
|
|
|
|
第 19 帖 | |
|
|
我个人认为,"进程替换"也算是一种"并行管道",只不过是一种有限制的"并行管道"罢了。
<(list), >(list)中的list是一种"命名管道"。 |
|
|
|
|
|
|
|
第 20 帖 | |
|
|
爱死你们了,尤其楼上的,解释的明白不象KornLee不给解释。
此外,林青霞的头像更是不一般 :) |
|
|
|
|
|