Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

while executing

cat test.txt | java myfile > test1.txt 2> test2.txt

I am getting error "Ambiguous output redirect."

my java file contains System.out and System.err .

I am in Unix csh environment.

share|improve this question
can you be more specific than "unix csh"? are you using tcsh? on Linux? BSD? Solaris? AIX? HPUX? (oh gawd, tell me you're not on HPUX... please... i still have nightmares) – quack quixote Mar 23 '10 at 5:52
i am using tcsh . – Harshit Mar 23 '10 at 5:55
I am sad for you. – Chris Johnsen Mar 23 '10 at 10:10
up vote 1 down vote accepted

got it in unix tcsh env i can run as follows :

(cat test.txt | java myfile > test1.txt) >& test2.txt
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.