Shell script to run script to record output from a program

Shell script to run script to record output from a program

Post by Michael Kaeriche » Thu, 05 Dec 1996 04:00:00

I am trying to record all output from a program by using script.  Having recently
learned a little shell programming, I though that this would be a good chance to
combine two commands into one shell script:

script -a myscriptfile

The problem is that script seems to start a subshell and I never get to the run
program line until I type exit to leave the script subshell.
I would use tee except that the program makes heavy use of buffering so I think I can
not afford a pipe.

Is there any way to call record a session of a program without having to type two
commands?  I thought perl maybe, but to learn enough may take a while.


1. Incomplete output from crontab email: running shell scripts from a perl script

I am running a perl script from my crontab.  The perl script that I
run executes shell scripts at the command line.  My crontab sends me
the output from this perl script that runs shell scripts.  However, if
I run the shell scripts directly from the crontab itself I get a
different output (the output that I want).

Why would a perl script that runs a shell script give me a different
"cron job" output then the shell script itself?

I don't think it is a perl problem but I am running the shell scripts
from perl with the following command: `$shell_script`.

Any help would be greatly appreciated.

2. C++ Passing ostreams by reference to methods, problem

3. running a program from within a script then returning to the script

4. s/allready/already/

5. Script command in shell script program ?

6. Motif problems

7. pipe output from c program to a korn shell script

8. "Could not connect to host localhost" in konquerer

9. Receiving output of Shell script into C program?

10. handling SIGINT in shell scripts when executing another shell script.

11. Q: How can I have a shell script call another shell script...

12. Shell script invoking other shell scripts

13. Running a Shell script from a C program.