1.

The first argument is read by the shell into the parameter ___(a) 1$(b) $3(c) $$(d) $1The question was asked during an interview.My question is taken from Shell Programming using read Command and Command Line Arguments topic in section Essential Shell Programming of Unix

Answer»

The CORRECT choice is (d) $1

To ELABORATE: COMMAND line arguments are stored into positional parameters. The first argument is read by the shell into the PARAMETER $1, second argument in $2 and so on.



Discussion

No Comment Found

Related InterviewSolutions