Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
    
This is not a duplicate, I'm asking a different question here. I'm wondering about the doubledash with no argument name following. –  Olivier Lalonde Oct 20 '12 at 15:34
    
Which is what I said, to the best of my comprehension. –  zmode Oct 20 '12 at 19:28
    
Right, my bad. I was referring to the duplicate link created by @Sathya. –  Olivier Lalonde Oct 20 '12 at 20:22
    
I've reopened it, @zmode. My apologies. –  Sathya Oct 21 '12 at 4:52

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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