This is a good example, imo, of why scripts should not use pipes (|) to separate commands.