nerdexam
Cisco

200-901 · Question #277

Refer to the exhibit. Which line must be included in the Bash script for the Python code to succeed?

The correct answer is B. export WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here. In Bash, export WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here both assigns the variable and exports it to the environment, making it available to child processes - including any Python script invoked from the Bash script. Python's os.environ.get('WEBEX_TEAMS_ACCESS_TOKEN')…

Application Deployment and Security

Question

Refer to the exhibit. Which line must be included in the Bash script for the Python code to succeed?

Exhibit

200-901 question #277 exhibit

Options

  • Adefine WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here
  • Bexport WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here
  • Cset WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here
  • DWEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here

How the community answered

(17 responses)
  • A
    6% (1)
  • B
    88% (15)
  • D
    6% (1)

Explanation

In Bash, export WEBEX_TEAMS_ACCESS_TOKEN=your_access_token_here both assigns the variable and exports it to the environment, making it available to child processes - including any Python script invoked from the Bash script. Python's os.environ.get('WEBEX_TEAMS_ACCESS_TOKEN') reads from the process environment, so the variable must be exported. Simply assigning WEBEX_TEAMS_ACCESS_TOKEN=value (Option D) without export creates a shell-local variable not visible to child processes. define (Option A) is not valid Bash syntax. set (Option C) is a Windows CMD/PowerShell syntax, not Bash.

Topics

#Bash scripting#Environment variables#API authentication#Secrets management

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice