Can any one help me out with redirecting shell out.
[root@localhost automation]# vi cs300.sh
#!/usr/bin/expect -f
set timeout -1
spawn ssh Monitor@172.30.19.96
expect "Password"
send "Password\r"
expect "Nimble OS"
send "date\n"
send "ctrlr --list\n"
send "pool --list\n"
send "vol --list\n"
send "vol --list | grep -i No\n"
send "nic --list\n"
send "ip --list\n"
send "disk --list\n"
send "netconfig --list\n"
send "snap --list --all --unmanaged\n"
send "fc --list | grep -i Yes\n"
send "fc --list\n"
send "shelf --list\n"
send "shelf --show_topology\n"
send "alert --list |grep -i WARNING\n"
send "exit\n"
set timeout -1
interact
after executing following script, output is incomplete. it is not capturing complete info on path
"/root/automation/log/`date +%d%b%Y_%H%M`"
logs.
[root@localhost automation]# vi nimble.sh
#!/bin/bash
path=/root/automation/log/`date +%d%b%Y_%H%M`
echo `expect /root/automation/cs300.sh` > `echo $path`
Any idea how to fix it.