Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Look at the following lines of code:




shift 2

What does the action command do?

share|improve this question
up vote 2 down vote accepted

Action is setting it's value to second argument of the script. If second argument is missing then it's set to "help".

share|improve this answer
What would be the output of 'help'? Will it open some kind of help file which is already present? – Akshaa Oct 8 '12 at 6:28
It depends on the rest of the code, paste the missing code. If have to guess, this is an init script that have a special action "help" that show usage, and with that line there instead of dying and showing usage help, it just set it to 'help' and let the code proceed, which will produce same result. But without code, that's just a random guess. – Valor Oct 8 '12 at 6:34
sorry dude, the code is confidential. But, yeah..I got it. Thanks :) – Akshaa Oct 8 '12 at 6:47

Your Answer


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.