10 More Discussions You Might Find Interesting
I'm fairly new to scripting so this might not be possible.
I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version:
... (0 Replies)
Discussion started by: IBGaryA
I have an expect script called remote that I want to call from inside my expect script called sudoers.push, here is the code that is causing me issues:
set REMOTE "/root/scripts/remote"
send_user "Executing remote script as $user...\n"
send_user "Command to execute is: $REMOTE... (1 Reply)
Discussion started by: brettski
Am very new to expect scripting..
Can You please suggest me how to call an expect script inside another expect script..
I tried with
send "expect main.exp\r"
Both... (1 Reply)
Discussion started by: Priya Amaresh
4. Shell Programming and Scripting
case $option in
d ) CHEC=true;;
# more option processing can go here
\? ) echo "Unknown option: -$OPTARG"
: ) echo "Missing option argument for -$OPTARG";;
* ) echo "Unimplimented option: -$OPTARG";;
shift $(($OPTIND - 1)) (2 Replies)
Discussion started by: upenmishra
5. Shell Programming and Scripting
When I run script listed below it causes my Linux to hang. When it freezes I can do totally nothing, move cursor, switch to another terminal or whatever. Linux is just not responding and the only way out I know is a hard reset of PC.
if ; then
echo "one parameter is needed: IP... (3 Replies)
Discussion started by: mass85
6. Shell Programming and Scripting
This Expect script provides expect with a list of IP addresses to Cisco IPS sensors and commands to configure Cisco IPS sensors. The user, password, IP addresses, prompt regex, etc. have been anonymized. In general this script will log into the sensors and send commands successfully but there are... (1 Reply)
Discussion started by: genewolfe
7. Shell Programming and Scripting
Hello to all...this is my first post (so please go easy). :)
I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed.... (2 Replies)
Discussion started by: v1k0d3n
8. Shell Programming and Scripting
I have a simple expect script I use to ssh to a workstation. I then pass control over to the user with interact.
This script works fine on my HP and Mac, but on my Linux Desktop, I get a problem where the terminal hangs when ever I execute a command in the interact session that requires a... (0 Replies)
Discussion started by: natedog
9. UNIX for Advanced & Expert Users
I am trying to call a multi-step script from a script.
here is the code
I am able to run the script but it is disconnecting before the dump job is finished. The script util.sh does not provide any functionality to wait... (9 Replies)
Discussion started by: laxman123
10. Shell Programming and Scripting
Im fairly new to scripting and am having a noobish issue. Ive got a script that checks for certain directories and if they dont exist, prompts the user to do a mkdir. heres trouble spot in the script:
cat dirlsttemp.dat | while read dir; do
echo "$dir does not exist, would you... (3 Replies)
Discussion started by: rdudejr