[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Dumb Shell Scripting Question.....
- Subject: [ale] Dumb Shell Scripting Question.....
- From: sriad at uab.edu (Aditya Srinivasan)
- Date: Thu Dec 9 15:01:26 2004
- In-reply-to: <[email protected]>
Hi Joe,
I believe the solution for this is to use the program script.
It will make a typescript of a terminal session thus recording everything
in an interactive session.
$script -a LOGFILE
At the end, get out of this "recording mode" with a Ctrl-D
Thanks,
sriad
On Thu, 9 Dec 2004, Joe Sechman wrote:
> I was wondering if it was possible to echo the name of a running
> command interactively in the shell to where the output contains the
> name of the command and the resulting command output - resulting in a
> log of commands (w/the help of tee, etc...) that were run matched with
> their output.
>
> For example:
>
> $ ls -la | tee -a myoutput
> ls -la | tee -a myoutput:
> total 32
> drwxrwxr-x 2 sechmanj sechmanj 4096 Oct 21 13:32 .
> drwx------ 29 sechmanj sechmanj 4096 Dec 9 10:08 ..
> -rw-rw-r-- 1 sechmanj sechmanj 579 Jun 14 13:43 franki.c
> -rw-rw-r-- 1 sechmanj sechmanj 190 May 11 2004 example.txt
> ...
>
> $ cat test | tee -a myoutput
> cat test | tee -a myoutput:
> This is a test file
>
> $ cat myoutput
> ls -la | tee -a myoutput:
> total 32
> drwxrwxr-x 2 sechmanj sechmanj 4096 Oct 21 13:32 .
> drwx------ 29 sechmanj sechmanj 4096 Dec 9 10:08 ..
> -rw-rw-r-- 1 sechmanj sechmanj 579 Jun 14 13:43 franki.c
> -rw-rw-r-- 1 sechmanj sechmanj 190 May 11 2004 example.txt
> ...
> cat test | tee -a myoutput:
> This is a test file
>
> I've got the sense that I'm missing something blaringly
> obvious.......Thanks in advance for any help!!
>
>
--
Thanks,
sriad