Positional Parameters

Last updated

What is Positional Parameters?

Positional parameters in shell scripting are variables that hold the command-line arguments passed to a script. These parameters are represented by special variables like $1, $2, $3, and so on, where each number corresponds to the order in which the argument was provided when the script was executed. $1 holds the first argument, $2 the second, and so forth, allowing scripts to access and process input provided by the user.

Free resources to learn Positional Parameters

More in stage 19: Script Arguments

Positional Parameters: common questions

Can I learn Positional Parameters in Hindi?

This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Positional Parameters in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.

Is this Positional Parameters tutorial for beginners?

It is lesson 94 of 166 in the free Shell / Bash roadmap, in stage 19, Script Arguments. If you are new to Shell / Bash, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.

Still confused? Ask me