help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] glpsol and standard input


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/myfifo

this 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]