Skip to content
Advertisement

What exactly do these arguments mean in linux?

I have a program written in C and the command I am supposed to run it with on linux looks like this:

JavaScript

What exactly does that mean? I think X Y will be the arguments so argc[2] will be X and argc[3] will be Y?

But what about --something?

Thanks a lot!

Advertisement

Answer

The C runtime does not discriminate any arguments, whether they start with -- or not. So you have,

JavaScript

It is your program that assigns meaning to those values.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement