Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!mintaka!think.com!snorkelwacker.mit.edu!bloom-beacon!dont-send-mail-to-path-lines From: swick@athena.mit.EDU (Ralph Swick) Newsgroups: comp.windows.x Subject: Re: XTERM and redirection. Message-ID: <9103041732.AA20831@lyre.MIT.EDU> Date: 4 Mar 91 17:32:46 GMT References: Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 28 I need to do some redirection: ie I WANT to call it like this: $ xterm -name DEMO -title DEMO -e 'demo2 input/sentences_1 < input/numbers_1' but what I get from the xterm is: xterm: Can't execvp a.out input/sentences_1 < input/numbers_1 Apparently the C code in the xterm can't handle the redirection. The 'execvp' in the error message should perhaps have given a clue. The C code in xterm doesn't do anything special at all; to get shell command interpretations, try xterm -name DEMO -title DEMO -e sh -c 'demo2 input/sentences_1 < input/numbers_1' Note especially ^^^^^ Alternatively, you could re-write the demo2 script to parse its arguments looking for the token "<" and use xterm -name DEMO -title DEMO -e demo2 input/sentences_1 '<' input/numbers_1 Ugly. The trick is to keep straight by whom and when the arguments are parsed.