From: Tobias Reif Date: 2002-05-24T22:19:59+09:00 Subject: Re: OS independent scripts, system calls on Windows and Linux nobu.nokada@softhome.net wrote: > Do you want to run internal commands of cmd.exe? It's > definitely system dependent. For external commands, > mingw32/mswin32 ruby runs a child process directly instead. I think you don't see my task or my problem; let me try to explain on a higher level. I'm using the PragProg installer on Win, and the ruby-talk .tar.gz on Lin. I need to use some tools for some files, and issue commands like dot -Tsvg -o links.svg links.dot java com.icl.saxon.StyleSheet -o links.dot svg-links.xml links2dot.xslt domcount -n svg-links.xml etc... I run those from the commandline ("DOS prompt" on Windows). Some are long, and I have around seven for that little project, so I put them in .bat files; but because the same thing will have to run on other Windowses, Linux, and perhaps many more platforms like Mac OS X, I choose Ruby as portable scripting language. People will have to be able run the same script without editing it. I need a very simple way to issue the list of commands, in a very simple and highly platform independent way. > I'm not sure what you mean by Stderr and Stdout. I need to get the stdoutput, and the strerr output. Xerces' domcount for example says something like "12ms, 25 elements" on success (that's what should bet printed, befor the next command is issued), and spits out error messages if the file was invalid XML (that's what should get printed befor everything stops because of an error that one command/tool returned.). So, like in my pseudo code example, I want to get each command executed, but see each one's output on the console, and possibly have the whole shebang come to a halt with an error massage if one tool raised one. Tobi -- http://www.pinkjuice.com/