1.

Explain the term positional parameters.

Answer»

In a shell program, positional parameters specify arguments that are used to launch the current process. A special set of variables is usually maintained by the shell for storing positional parameter values. BASH is an EXAMPLE of a shell that uses positional parameters. The bash shell can be used on Linux, BSD, macOS X, and Windows 10.

For example: 

mycommand ONE five "SIX four”   

In this case, the command name is mycommand, and there are four parameters in the command line: one, five, and "six four”.   

Note: A space delimits each positional parameter and each thing after spaces are interpreted by the shell as individual parameters. Therefore, the parameter itself should be enclosed in quotation marks if it CONTAINS a space, as in "six four".



Discussion

No Comment Found