Sunday, July 30, 2006

Linux/Unix test: grep

grep -lr "[[:digit:]]\{3\}[-]\?[[:digit:]]\{3\}[-]\?[[:digit:]]\{4\}" *

for US tel numbers.
grep 123-344-5678 *
cat ex3.cpp | grep 123-344-5678

No comments:

Post a Comment