script command lacks the -c flag
I'm writing a cross-platform wrapper for an interactive perl script. Linux, Solaris 8 and 10. We need to be able to log everything shown on the screen to a text file.
The perl script is menu-driven with refreshes, colors, etc. so we can't use tee. In Linux we use script -c but Solaris lacks the -c flag. I tried a here doc with script but this is what I got:
bash-2.03$ script /tmp/deleteme.txt.scr << EOF
> who
> EOF
Script started, file is /tmp/deleteme.txt.scr
Script done, file is /tmp/deleteme.txt.scr
Bad address
We might be able to use the screen command, but do you know a way to get script working? Any other apps which could do the job?
The perl script is menu-driven with refreshes, colors, etc. so we can't use tee. In Linux we use script -c but Solaris lacks the -c flag. I tried a here doc with script but this is what I got:
bash-2.03$ script /tmp/deleteme.txt.scr << EOF
> who
> EOF
Script started, file is /tmp/deleteme.txt.scr
Script done, file is /tmp/deleteme.txt.scr
Bad address
We might be able to use the screen command, but do you know a way to get script working? Any other apps which could do the job?
0