[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

shell redirection (was: Re: [LI] SiS 6202 partly working)



Rohit forced the electrons to say:
> Then, Atul, reply if the following statement is wrong.
> "&> can be used to check the errors generated by the compilers too..."

Oh yes... as a matter of fact, gcc writes error/warning messages to stderr, so
you could use 2> as well.

The idea is, use something like 

gcc -Wall file.c 2> ./errors

and then use this file to correct the errors (vim comes with a utility that
can parse this error file).

To pass stderr to a filter, the command line is:

gcc -Wall file.c 2>&1 | less

Binand

-- 
#include <stdio.h>                                   | Binand Raj S.
char *p = "#include <stdio.h>%cchar *p = %c%s%c;     | This is a self-
int main(){printf(p,10,34,p,34,10);return 0;}%c";    | printing program.
int main(){printf(p,10,34,p,34,10);return 0;}        | Try it!!
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available.  Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.