Issue
- How do I record on a .txt file the results of executing the lb command on Gogoshell.
Environment
- DXP 7.0
Resolution
This is achieved by creating a script to record the session on Telnet. It's not possible to do it via Gogoshell.
- Create a script like this:
#!/usr/bin/expect
spawn telnet localhost 11311
set timeout 20
expect "g!"
send -- "lb\r"
expect "g!"
send -- "disconnect\r"
expect "Disconnect from console? (y/n; default=y)"
send -- "y\r"
- Save it with any name, like dxplb.exp
- Give it execute permissions chmod a+x dxplb.ext
- Execute it in any of this ways:
./dxplb.exp > results.txt
or
./dxplb.exp | tee results.txt