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

I'm not misunderstanding, you are :)

You want:

 echo "foo" | script.pl -p 100 > foo.txt

not just:

 script.pl -p 100

The point is:

How can a script (in any language) have that data if the shell does not give it?

I recommended rethinking how to reach your goal:

 To log exactly how a given piece of data was had.

So what you should do is get the info *inside* your script and log it that way:


script.pl -p 100 -in foo -out foo.txt

now in side open foo and put it in foo.txt


Now you know that the input is from foo and it was written to foo.txt and -p was 100, etc etc:

a) without having to somehow farm data that simply isn't available 99.9% (pronounced 100%) of the time

 b) without having to get it from the PID info

c) in a form that can be logged in a format that will be more usefull later (CSV, mySQL, etc) so that you can, say , generate reports on how many widgets were from foo in a given date range and the files that they were put in

HTH :)

--
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