Q: Recording shell script screen output using "script" command ?
Hello,
I need to capture everything showed on a screen by a shell script which needs user interaction. The shell script performs commads such as rsh so normal redirection to a file does not work.
I know there is a special unix command call "script" which records screen session but the problem is that command creates his own sub-shell, avoiding launching a shell script which a "script" command built in.
For example, how followings lines in the same shell script get as result the ls command in filename.txt ?
#!/bin/ksh
script filename.txt
ls
Any idea or suggestion ???
Last edited by lalfonso.gomez; 07-20-2006 at 05:27 AM..
|