I'm trying to capture the output of some commands with the 'script' utility. Normally, I would type 'script /path/to/output/file', then enter commands, then hit ctrl+D to end the 'script' capture. I'm having trouble with it on a server. Upon starting 'script', it exits immediately before I type any commands or hit ctrl+D.
'which script' shows that /usr/bin/script is running. BTW, I didn't mention before, this is Solaris 8.
---------- Post updated at 08:21 PM ---------- Previous update was at 08:03 PM ----------
I am trying to login to a router from my server & get a screen capture of some output. I used a workaround of "(ssh router) 2>&1 | tee /tmp/output.txt" which seems to work, but I'm still curious why 'script' was exiting immediately.
AHA! $SHELL was set to /usr/bin/no_shell.ksh. Looks like it was an attempt at security by another user. It was doing some user validation before running /usr/bin/ksh. I set SHELL=/usr/bin/ksh and 'script' works as expected.