2

I've seen many command line tools that take a "--" argument. For example:

gem install mysql -- —–with-mysql-config=/usr/local/mysql/bin/mysql_config

What does it stand for? Does it have a special meaning?

6

It means the tool should stop treating the dash as an option character. For example, suppose you want to search for a dash character in a file:

grep -- - file

In your example the -- is necessary because the gem tool is calling another tool, which also uses dash-prefixed options.

4

This is common practice when one program, that takes long options, needs to call another program that also takes long options. It signals the first program to stop parsing options, and pass the rest on, unchanged, to the subprocess that it invokes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.