From: Charles Hixson Date: 2001-10-05T06:19:18+09:00 Subject: [ruby-talk:22101] Ruby pipe problem? This is a multi-part message in MIME format. --------------020802080108060807040602 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit System: Win95 Ruby -v: ruby 1.6.3 (2001-03-19) [i386-cygwin] program fragment: tmp = "short -html2 #{fil}" # > " + tip_root + doc_dir + "\\" + fil + ".html" print `pwd` + " :: " puts tmp tmp2 = `#{tmp}` puts tmp2 If I execute the commands as shown, then ruby works properly, the short command works properly, etc. If, instead, I change the first line so that the tail is not commented (well, and variable tmp2 is not created), then no file is created, and, appearantly, a lot of stuff gets written to /dev/null (OK, it's windows 95, but I'm executing this from a CygWin shell.) printing varialbe tmp shows that it contains the desired code, and executing that code in the shell works properly (assuming that I'm in the correct directory, which is verified by the print `pwd` command. The command was: $ ruby DocBuilder.rb > out.txt 2> err.txt (See the attached file, though out.txt has been truncated for the sake of brevity. err.txt was empty.) --------------020802080108060807040602 Content-Type: text/plain; name="out.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="out.txt" /cygdrive/c/docs/tip_html/DocProc DocBuilder.rb/cygdrive/c/Docs/TIP_HTML/ :: short -html2 utils UTILS: Eiffel class interface
class interface UTILS


end of UTILS
/cygdrive/c/Docs/TIP_HTML/ :: short -html2 logger LOGGER: Eiffel class interface
class interface LOGGER

creation
   make

--------------020802080108060807040602--