m*t 发帖数: 7490 | 1 有一个程序abc,没有源代码,只能运行
命令行运行格式为
abc a.txt
结果会自动放在 a.txt.output里面
现在问题是能不能将a.txt替换成标准输入,a.txt.output替换成标准输出?
这样我就可以用管道将上一步的结果直接输入abc然后将此步结果直接送到下一步的程
序输入中。像这样运行
prog1 | abc | prog2 |
|
i*****f 发帖数: 578 | 2 prog1 > a.txt && abc && cat a.txt.output | prog2
abc can not take advantage of pipes if it is coded like that. |
|
y*********e 发帖数: 518 | 3 class Database {
final Object syncRoot = new Object();
public void prog1() {
X;
synchronized (syncRoot) {
A;
B;
}
Y;
}
public void prog2() {
D;
synchronized (syncRoot) {
A;
}
C; // whatever
}
} |
|
l***o 发帖数: 194 | 4 I am learning from this article about how you can generate a txt file for a
directory. but when I use this one line code here, not working. can anyone
help? I have been trying this for few hours. :-(
thanks.
x “dir c:\chen >c:\chen\proglist.txt”
The generated .TXT file looks like the following:
Volume in drive C has no label
Volume Serial Number is 07CF-0B10
Directory of C:\chen
. 05-24-01 2:35p .
.. 05-24-01 2:35p ..
PROG1 SAS 0 05-24-01 2:35p prog1.sas
PROG2 SAS 0 05-24-01 2:35p pr |
|
f*******n 发帖数: 2665 | 5 新装的SAS EG, 有个怪问题。我有一个SASEG的project, 里面有几个program,我发
现prog1里面的macro,在prog2里面调用时被告知不存在(我是先运行1之后才运行2的
),类似的,prog3里产生的临时数据(work.xx)在prog4里也找不到。我以前用EG从未
遇到这种问题,是不是哪里的设置有问题?多谢! |
|