I do not consider that to be a fault with the ERASE command; in fact, quite the contrary is true. In addition, it does not address the original question, which was in essence, if filea is not present, erase fileb. For a single file, I would think that a sequence of commands, 'STATE filea'; if rc ^= 0 then 'ERASE fileb' would be inherently more efficient than invoking PIPELINES to do the job and would be clearer to any novice programmer reading the code. Why use a sledge hammer to drive a tack or a bulldozer to move a pebble? Your solution is what I consider to be a misuse of Pipes.
Besides, if FOO BAR A does not exist, your pipeline will fail at the first stage. The suggested Pipe using STATE does not have this failing, but even it is overkill for a single file. Regards, Richard Schuh > -----Original Message----- > From: CMSTSO Pipelines Discussion List > [mailto:[email protected]] On Behalf Of Paul Gilmartin > Sent: Tuesday, November 23, 2010 6:29 PM > To: [email protected] > Subject: Re: Treating absent files as empty > > On Nov 23, 2010, at 10:08, Schuh, Richard wrote: > > > Is there something wrong with the ERASE command? > > > Yes, there is something wrong with ERASE. Consider: > > PIPE < FOO BAR A | LOCATE something | > FOO BAR A > > -- gil >
