Just came across this guy that left me stunned:
gcc -E -dM - </dev/null
This part is confusing to me:
- </dev/null
Just came across this guy that left me stunned:
gcc -E -dM - </dev/null
This part is confusing to me:
- </dev/null
That gives a listing of all the predefined macros in gcc. -E means run the preprocessor. -dM means dump the predefined macros from the preprocessor. The - is for reading from standard input and /dev/null just feeds in an empty source file.
The "</dev/null" bit is at the shell level and not specific to gcc
< defines input file
> defines ouput file for std out,
>> defines a output for std out that will be appended to,
| sends std out output to another process on it's std in
I forget the syntax but you can also specify std err aswell like &2>
The name after the brackets is the name of a file, where /dev/null is an empty file
man sh should get you to the right sort of help for these questions.
Don't have access to gcc at the moment, assuming from other comment that - is reading from std in, then and equivelant statement is
gcc -E -dM /dev/null