sweetser has asked for the wisdom of the Perl Monks concerning the following question:
I know that $0 will print the command that runs a perl script. Is there a way to capture the commands before the perl script that are piping their results into the perl script?
My goal is to write a bunch of simple programs that love to use pipes, and connect them together. The last program is a perl program, and it would be great if it could record what exactly was done. Here's and example:
> constant_linear_motion 100 2 5 6 3 0 0 0 0 > q1.data; cat q1.data | q_conj >> q1.data; cat q1.data |q_sort |q_graph
If I could get the perl program q_graph to record all the preceding parts starting from "constant_linear_motion", that documentation would be great.
Thanks,
doug
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Collecting a piped command line
by liverpole (Monsignor) on Jul 22, 2006 at 23:46 UTC | |
by sweetser (Acolyte) on Jul 23, 2006 at 13:39 UTC | |
by sweetser (Acolyte) on Aug 01, 2006 at 23:05 UTC | |
|
Re: Collecting a piped command line
by GrandFather (Saint) on Jul 22, 2006 at 23:17 UTC |