Can someone break this line separately gcc -E -dM - </ dev / null

Just stumbled upon this guy who left me stunned:

gcc -E -dM - </dev/null

This part is confusing to me:

 - </dev/null   
+5
source share
2 answers

bit "</ dev / null" is at the shell level and is not defined for 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 std in

I forgot the syntax, but you can also specify std err in the same way as & 2>

The name after the brackets is the file name, where / dev / null is the empty file

man sh should help you find the right help for these questions.

You do not have access to gcc at the moment, assuming from another comment that - is read from std in, then the equivelant statement

gcc -E -dM /dev/null
+3
source

gcc. -E . -dM . The - /dev/null .

+14

All Articles