Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How to Google a question mark?

I saw a trick in a book:

In a linux shell, we can use $? to get the return value of a command. For example, after we run a command, if it exits normally, the return value is 0. Then when we type $?, we will get 0 in the screen.

I want to google this kind of usage, so I have to type these two symbols $? in the search blank. But the search engine just returns nothing to me...

I have looked at the Google help page, but still can't find a solution.

So my question is: How can I search for this kind of keyword?

Or if you can give me some advise on the usage of $? or that sort of thing, that will be also appreciated.

share|improve this question

migrated from May 23 '10 at 17:38

This question came from our site for professional and enthusiast programmers.

marked as duplicate by Arjan, random May 24 '10 at 2:20

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Although it's hard to believe sometimes, Google isn't magic :)
  • Web search relies on an index and index is built of tokens. Usually punctuation is removed before tokenization of your query. Some special cases exist, which are probably determined from popular queries (For example, google recognizes c++).
  • So, when you type $?, google throws away punctuation and you have no query :)
  • You can google search for 'bash variables', which led to this page: section 3.2.5: Special Parameters that details $?.
  • Alternatively run man bash from your command line and there's an overview.
share|improve this answer

bash(1) man page, PARAMETERS section, Special Parameters subsection.

share|improve this answer