ETExamTower
Q15Management and Operations

Drag and drop the commands from the left into the correct categories on the right. <DragDrop items={["switch# run bash\nbash-4.2$ vsh –c “configure terminal ; interface eth1/2;\nshutdown; sleep 2; show interface eth1/2 brief”","switch# run bash\nbash-4.2$ vsh –c “configure terminal interface eth1/2 shutdown\nsleep 2 show interface eth1/2 brief”","switch# run bash sudo su\nbash-4.2$ vsh –c “configure terminal ; interface eth1/2;\nshutdown; sleep 2; show interface eth1/2 brief”","switch# run bash sudo su\nbash-4.2$ vsh –c “configure terminal ; interface eth1/2;\nshutdown, sleep 2, show interface eth1/2 brief”】【],","slots:[{"]} slots={[{"answer":"switch# run bash\nbash-4.2$ vsh –c “configure terminal ; interface eth1/2;\nshutdown; sleep 2; show interface eth1/2 brief”","id":"will_run_1","group":"Will Run Successfully"},{"answer":"switch# run bash sudo su\nbash-4.2$ vsh –c “configure terminal ; interface eth1/2;\nshutdown; sleep 2; show interface eth1/2 brief”","id":"will_run_2","group":"Will Run Successfully"},{"answer":"switch# run bash\nbash-4.2$ vsh –c “configure terminal interface eth1/2 shutdown\nsleep 2 show interface eth1/2 brief”","id":"error_1","group":"Will Cause an Error"},{"answer":"switch# run bash sudo su\nbash-4.2$ vsh –c “configure terminal ; interface eth1/2;\nshutdown, sleep 2, show interface eth1/2 brief”】【],","id":"error_2","group":"Will Cause an Error"}]} explanation={"NX-OS's \"vsh -c\" invocation requires each discrete CLI command inside the quoted string to be delimited by a semicolon; the shell/vsh parser does not treat plain whitespace or commas as command separators. A string that correctly chains \"configure terminal ; interface eth1/2; shutdown; sleep 2; show interface eth1/2 brief\" with semicolons runs successfully whether it is invoked from a plain \"run bash\" shell or from a \"run bash sudo su\" root shell, because the semicolon-delimited syntax itself is what vsh requires. Conversely, a string that concatenates the commands with spaces only (no semicolons) is parsed as a single malformed command and fails, and a string that uses commas in place of semicolons is likewise invalid vsh syntax and produces an error."} reuse={false} />

← → navigate · a answer
Discussion · 0
No comments yet. Be the first.