Re: Replacement for eval

From: Icarus Sparry (usenet_at_icarus.freeuk.com)
Date: 07/14/05


Date: Thu, 14 Jul 2005 04:48:19 GMT

On Thu, 14 Jul 2005 00:43:41 -0400, nemgushov wrote:

> In a several scripts that I have "inherited", we use the following function:
>
> function xyz {
> echo "`date` $@" >> debug.log
> eval $@
> }
>
> then use the xyz to aid in logging of other scripts/commands:
> xyz rcp .....
> xyz cp ....
> xyz mv ....
>
> I am looking for a replacement for this function. I've tried :
> script debug.log 2>&1
>
> but it's not what I'm looking for. I am looking for a wrapper for each
> individual subscript/command which timestamps each command and appends to
> the debug log.

What is wrong with your existing 'xyz' function? Why do you want to
replace 'eval'?



Relevant Pages

  • RE: IF statements in Macros
    ... public function XYZ() ... so if you the replacement of abc with xyz is ... statements within the same macro or do i need to create seperate modules? ... at the moment i am just using the record macro option to record while i copy ...
    (microsoft.public.excel.programming)
  • Replacement for eval
    ... In a several scripts that I have "inherited", ... echo "`date` $@">> debug.log ... then use the xyz to aid in logging of other scripts/commands: ... the debug log. ...
    (comp.unix.shell)