Free CompTIA Linux+ XK0-005 Practice Question

During script execution, an administrator needs to ensure a command is executed only when a certain variable holds the exact word 'config'. Which syntax will correctly verify this within an if statement?

  • [[ $VARNAME == 'config' ]]

  • [[ $VARNAME -eq 'config' ]]

  • [[ $VARNAME != 'config' ]]

  • [ $VARNAME == 'config' ]

This question's topic:
CompTIA Linux+ XK0-005 / 
Scripting, Containers, and Automation
Your Score:

Check or uncheck an objective to set which questions you will receive.

SAVE $45