[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



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



</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00396" href="msg00396.html">[ale] Dumb Shell Scripting Question.....</a></strong>
<ul><li><em>From:</em> joe.sechman at gmail.com (Joe Sechman)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00399.html">[ale] Re: Hello</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00401.html">[ale] Dumb Shell Scripting Question.....</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00396.html">[ale] Dumb Shell Scripting Question.....</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00401.html">[ale] Dumb Shell Scripting Question.....</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00400"><strong>Date</strong></a></li>
<li><a href="threads.html#00400"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>