I tried following this but that doesn’t work in Unix.
I’ve been running this command :
gcc temp.c -o temp.o 2> err.txt
And got the following error:
gcc: 2: No such file or directory
Any ideas what that shouldn’t work? Maybe because I’m using it over a Unix server?
In
tcshyou don’t use2>to redirect stderr, you use>&that will redirect both stdout and stderr. If you want to redirect them separately, have a look at this quick guide.