Andreas Vox wrote: > If you care about overwriting files you could test for > existence of $2.
This is not necessary here. Either $2 is in a temp dir, was previously created by the very same script and needs to be updated. Or it is not in the temp dir, and the caller of the script checked for its existence before and, if it existed, asked the user for confirmation before overwriting it. Well, this is at least the theory, but if it is not true, it needs to be fixed in lyx and not in the script. Georg