Execute script on the fly

Hi all,
I am calling a zsh script from batch file .

This zsh just removes the trigger file in a particular directory.File name is passed as a parameter from the batch file Problem is this batch is called in multiple other batch files and sometimes system says file cant be used as it is used by other program .
Can you please let me know whether we can craete a zsh file on the fly and execute and remove that. Trigger file names are unique

Thanks
DJ

Yes, we can

How do we do ? Any sample script you have ?

I can't imagine why a shell script should not be useable by several processes. To enlighten me, please post the directory structures that you use and the error messages that are issued.

Hi all,

I have a little problem with a expect in a bash Script.
The hull of my script:

#!/bin/sh

( expect -c '
set a \"eee\";    # the variable a
' )
echo $a;          # using the variable out of the expect script

I would like to use the variable out of the expect script(in bash), but it doesn't work.
I already tried "export" and "global" but nothing works.
Could someone help me please?