Logging is just a fill-in example.   An abstraction of the general
case would be:

#!/bin/bash
do_something_first
run_program
do_something_last

do_something_first could be logging, sending an e-mail, or preparing a
special environment.
run_program could be the original program or perhaps modified
conditions (e.g. niced or additional/modified arguments)
do_something_last could be some kind of clean up process.

Regards,
- Robert

On Thu, Aug 9, 2012 at 3:23 PM, Andrew Freiberger <[email protected]> wrote:
> if you're intent is to replace /usr/bin/perl with a logging wrapper, that's
> best done in a compiled language as the #! is a shell interpreted special
> handler.
>
> Or maybe selinux or process accounting can do your logging for you
>
> -Drew
>
> On Thu, Aug 9, 2012 at 1:53 PM, Robert Citek <[email protected]> wrote:
>>
>> On Thu, Aug 9, 2012 at 2:28 PM, Seibel, Rich <[email protected]> wrote:
>> > It works for me if I change the first line of hw.pl to
>> > #!/bin/bash perl.sh
>>
>> That work.  As did '#!/bin/env perl.sh' Unfortunately, that would mean
>> modifying the perl scripts, something I don't want to do.
>>
>> Regards,
>> - Robert
>>
>> _______________________________________________
>> Discuss mailing list
>> [email protected]
>> http://www.sluug.org/mailman/listinfo/discuss
>
>
>
> _______________________________________________
> Discuss mailing list
> [email protected]
> http://www.sluug.org/mailman/listinfo/discuss
>

-- 
Central West End Linux Users Group (via Google Groups)
Main page: http://www.cwelug.org
To post: [email protected]
To subscribe: [email protected]
To unsubscribe: [email protected]
More options: http://groups.google.com/group/cwelug

Reply via email to