if ls * | grep foo; then echo ok; fi