[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Dumb Shell Scripting Question.....
- Subject: [ale] Dumb Shell Scripting Question.....
- From: joe.sechman at gmail.com (Joe Sechman)
- Date: Thu Dec 9 14:16:29 2004
- In-reply-to: <[email protected]>
- References: <[email protected]>
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!!
--
Joe Sechman
Unix / Linux Systems Administrator
RLU: #367555
http://counter.li.org