CompTIA Linux+ XK0-006 (V8) Practice Question

A system administrator writes a shell script that first defines a variable named API_KEY and then executes a separate compiled program. The program is designed to read the API_KEY value from its execution environment. When the script is run, the program fails because it cannot find the API_KEY variable. Which of the following commands must be added to the script before the program is executed to resolve this issue?

  • export API_KEY

  • set API_KEY

  • local API_KEY

  • env API_KEY

CompTIA Linux+ XK0-006 (V8)
Automation, Orchestration, and Scripting
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

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

Bash, the Crucial Exams Chat Bot
AI Bot