I'll be closing this unless I can see leads soon as I'm pretty much out of time and I'll be unsubscribing when I'm done.

At 8:56 AM -0500 12/1/06, Bob Showalter wrote:
I'm with JupiterHost; what exactly are you trying to accomplish here?

I thought I'd already said that, but perhaps I missed it somehow: I want to place the full command line that generated the output in the output file to record its origins.

As you can see, I really do "just need the command line"! It strikes as one of those things that'll be obvious to the right person or it just can't be done. (I realise this is only partial traceability, but its a sight better than none. I'd have to also at least also grab the values of the environment variables in the command line as well, but first things first.)

It would seem pretty easy for a shell to export the command line on the face of it. The shells do know this of course, its just they don't pass the knowledge on... I wrote here suspecting that that might be the case, but on the other hand some of these things are tucked away in poorly documented (environment) variables, etc., so I thought it'd be worth at least asking.

If you've ever returned to a large data-processing project after a hiatus you'd understand how valuable having headers specifying how an output was generated can be. A "gotcha" with shells is that the the real inputs/outputs are often not in the command itself, but accessed via pipes or redirects. This is particularly true with perl scripts being often used as filters, with only stdin/out/err used within the script and the real IO source/targets specified via pipes, etc.

Before anyone says, you certainly could refuse to use perl scripts as filters and always insist on all parameters being given explicitly in the argument list, but apart from being clumsy it'd force you to generate a lot of intermediate files, a serious issue if they are very large.

Perhaps there is a list that deals with interactions with the shells? Or perhaps its just not worth the effort...! :-/ (I know this may not be the right forum, but none of the others seemed appropriate either!)


Lief, no, you're joining JupiterHost in misreading my posts (!): command *line*, not *command*. It is a bit subtle, but its also the whole point of my previous post... ;-) (sigh) No offense, but I don't think you've really reading my posts. I use ARGV every day of course; it doesn't give the whole command *line*, only the argument list and also only after shell processing. I'll let you figure out the rest ;-) (Hint: read my example command line closer.)



Grant
--
-------------------------------------------------------------------
Grant Jacobs Ph.D.                                     BioinfoTools
ph. +64 3 478 0095  (office, after 10am)               PO Box 6129,
or  +64 27 601 5917 (mobile)                               Dunedin,
[EMAIL PROTECTED]                               NEW ZEALAND.
Bioinformatics tools: deriving knowledge from biological data Bioinformatics tools - software development - consulting - training
 15 years experience in bioinformatics ready to solve your problem
Check out the website for more details: http://www.bioinfotools.com

The information contained in this mail message is  confidential and
may be legally privileged.  Readers of this message who are not the
intended recipient are hereby notified that any use, dissemination,
distribution or reproduction of this message is prohibited.  If you
have received this message in error please notify the sender immed-
iately and destroy the original message.  This applies also to  any
attached documents.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to