exam questions

Exam 350-601 All Questions

View all questions & answers for the 350-601 exam

Exam 350-601 topic 1 question 53 discussion

Actual exam question from Cisco's 350-601
Question #: 53
Topic #: 1
[All 350-601 Questions]


Refer to the exhibit. Which command is run from the Guest Shell to set the description on the first five interfaces of the Cisco Nexus switch?

  • A. [guestshell@guestshell ~]$ for x in {1..5}; dohost ג€conf t ; interface eth1/$x ; description Server$xג€;
  • B. [guestshell@guestshell ~]$ for x in {1..5}; do dohost ג€conf t ; interface eth1/$x ; description Server$xג€; done
  • C. [guestshell@guestshell ~]$ for x in (1..5); do dohost ג€conf tג€; ג€interface eth1/$xג€ ; ג€description Server$xג€; done
  • D. [guestshell@guestshell ~]$ for x in (1..5); dohost ג€conf t ; interface eth1/$x ; description Server$xג€;
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
freddycisco
Highly Voted 3 years, 5 months ago
Correct B NXs1# guestshell [admin@guestshell ~]$ for x in {1..5}; do dohost "conf t ; interface eth1/$x ; description Server$x" ; done Enter configuration commands, one per line. End with CNTL/Z. Enter configuration commands, one per line. End with CNTL/Z. Enter configuration commands, one per line. End with CNTL/Z. Enter configuration commands, one per line. End with CNTL/Z. Enter configuration commands, one per line. End with CNTL/Z. [admin@guestshell ~]$
upvoted 12 times
...
Valkyrie17
Highly Voted 3 years, 5 months ago
Answer is B: [admin@guestshell ~]$ for i in {1..5}; do dohost "conf t ; int eth1/${i} ; desc Server_${i}"; done Enter configuration commands, one per line. End with CNTL/Z. Enter configuration commands, one per line. End with CNTL/Z. Enter configuration commands, one per line. End with CNTL/Z. Enter configuration commands, one per line. End with CNTL/Z. Enter configuration commands, one per line. End with CNTL/Z.
upvoted 6 times
...
naleenh
Most Recent 9 months, 2 weeks ago
Selected Answer: B
https://learnduty.com/tutorials/cisco-guest-shell-explained/ [guestshell@guestshell ~]$ for x in {1..5}; do dohost "conf t ; interface l$x ; ip address 10.0.0.$x 255.255.255.255" ; done
upvoted 1 times
...
groblok
1 year, 2 months ago
Selected Answer: B
As other have pointed out. Bash shell for loop syntax requires ; done at the end
upvoted 1 times
...
vladdar
1 year, 9 months ago
what is the difference between B and C answers ? they look exactly the same to me
upvoted 1 times
...
C4rlos
1 year, 11 months ago
What is the difference between options A and D?
upvoted 1 times
...
Hubchub67
2 years, 1 month ago
Selected Answer: B
Answer is B.
upvoted 1 times
...
GuyThatTakesDumps
2 years, 2 months ago
Selected Answer: B
b is the one
upvoted 1 times
...
mahmoudlol
2 years, 4 months ago
Selected Answer: B
Yes, It is B
upvoted 1 times
...
mauchi
2 years, 7 months ago
https://www.cyberciti.biz/faq/bash-for-loop/ as mentioned, bash for loop needs the do and done, and the "dohost" is the command that executes something onto the NX-OS
upvoted 2 times
...
Smoothey
2 years, 8 months ago
https://www.reddit.com/r/networking/comments/6lm34k/cisco_is_coming_out_of_its_shell/
upvoted 1 times
...
mojzucha
3 years ago
B of course. Bash needs do and done keywords.
upvoted 3 times
SwitchKiller
2 years, 8 months ago
I don't know anything about BASH but none of the Cisco Documentation I have found online makes reference to the "do" or "done" commands, its simply executes from the "dohost" keyword, so Answer A or possibly D, as they look identical to me, would be correct. Are you saying 'do/done' are required for the repition of the command acroos the 5 interfaces? So use just "dohost" to execute on a single interface but use do dohost..... done to execute across 5 interfaces?
upvoted 1 times
SwitchKiller
2 years, 7 months ago
For anyone reading since my last comment a quick google search will show that dohost is required to run a Cisco command but do dohost is required to create a loop for when you need to for example add a description to 5 interfaces. As advised by all these good people the answer is B
upvoted 2 times
...
...
...
jdub95
3 years, 3 months ago
But everything in this guide shows only dohost without the do in front of it? https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus9000/sw/7-x/programmability/guide/b_Cisco_Nexus_9000_Series_NX-OS_Programmability_Guide_7x/Guest_Shell.html
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago