Grant Jacobs wrote:
I want is
the whole command *line*, not the portion of it that evoked the script,
the latter being the individual *command* within the command
line--confusing enough ;-) ? If I issue the example I gave in my OP:
echo -n "Starting..." ; more some-stuff | \
doStuff.pl - 3 > save-here.out ; echo "done."
Within doStuff.pl I want to obtain the command line, i.e. everything
from "echo" through to '"done."', or at least everything from "more"
through to "save-here.out". (As I wrote in my OP: "everything including
pipes and redirects, etc.") Its the reason I gave this extended example
command line as an example, including it spanning lines.
That information is known only to the shell. The shell does a lot of
processing of any given command line before invoking the program(s)
specified. Unless the shell you're using has some mechanism for
exporting that information (e.g. a history file), you're out of luck.
Any solution will be specific to the particular shell you're using.
Unix::PID knows only about the stuff that ps(1) knows, which is from the
information passed to execve(2) when the program is launched. Pipe
chars, redirection, etc. are all shell metachars that have no meaning to
the kernel itself.
I'm with JupiterHost; what exactly are you trying to accomplish here?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>