RE: Preventing shell redirection from creating empty file

2004-10-29 Thread Jim
> > On Tue, 26 Oct 2004, Dan Fish wrote: > > > system("myscript.pl arg1 arg2 > myfile.txt"); > > > > What is the easiest way to prevent "myfile.txt" from being > created if > > the script dies or produces no output? (It seems the shell > will always > > create myfile.txt, regardless) > >

Re: Preventing shell redirection from creating empty file

2004-10-28 Thread Chris Devers
On Tue, 26 Oct 2004, Dan Fish wrote: > system("myscript.pl arg1 arg2 > myfile.txt"); > > What is the easiest way to prevent "myfile.txt" from being created if > the script dies or produces no output? (It seems the shell will always > create myfile.txt, regardless) Would it be enough to just de