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

Re: [Q] HOWTO redirect a i/o-port in Unix??




Here is a (stupid) trick that I used in my Web page building scripts: 

(with-output-to-file "date.txt" 
  (lambda () 
    (display (read-line (car (process "date"))))))

This copies text from the process port to the file "date.txt". 

There are better ways to hook up ports but your reference to (process
"myprog") reminded me of this. -- Matthias

[*] I call this trick stupid because I am too lazy to use our date library
for this case. Copied code ... and the draw of the luck that I hardly ever
program under Windows.