nerdexam
IBM

C4040-221 · Question #88

Which Korn shell syntax is used to assign the directory of the called script to a variable called mydir?

The correct answer is A. mydir=$(dirname $0). See the full explanation below for the reasoning.

Question

Which Korn shell syntax is used to assign the directory of the called script to a variable called mydir?

Options

  • Amydir=$(dirname $0)
  • B$mydir=$(dirname $0)
  • Cmydir=${dirname $@}
  • Dmydir=$(dirname $?)

How the community answered

(48 responses)
  • A
    81% (39)
  • B
    2% (1)
  • C
    6% (3)
  • D
    10% (5)

Community Discussion

No community discussion yet for this question.

Full C4040-221 Practice