|
From: | François Galea |
Subject: | Re: [Help-glpk] glpsol and standard input |
Date: | Wed, 10 Aug 2005 13:48:55 +0200 |
User-agent: | Mozilla Thunderbird 1.0.2 (X11/20050602) |
Jérôme Kunegis a écrit :
Hello, I would like to point out that many command line programs accept "-" as a filename to make them read standard input. As far as I could see, "glpsol" does not do this. This feature is really not important, but it would be nice to have if it's not difficult to implement.
On Unix systems, the use of fifos (named pipes) can help you. for example : $mkfifo -m 600 /tmp/myfifo $mylpgenerator >> /tmp/myfifo & $glpsol --mps /tmp/myfifothis way, the standard output of the "mylpgenerator" progam will be used as the input for glpsol, and no file will be created on disk.
Another solution would be to make glpsol read explicitly from the standard input (on Linux systems) :
$mylpgenerator | glpsol --mps /dev/stdin'/dev/stdin' is the special device file for the current process' standard input.
françois.
[Prev in Thread] | Current Thread | [Next in Thread] |