Making decisions on expect return
问题 I am trying to create an expect script which will send a different password string based on the "expect" Condition A: If a cisco device has not been setup with a username then the first prompt will simply be "Password:" - then it should use passwordA (no username) Condition B: If it has been setup with a username then the prompt will be "Username:" followed by "Password:" - then it should use Username and PasswordB #!/bin/bash # Declare host variable as the input variable host=$1 # Start the