$ grep -n sudo /etc/group $ grep -E 'user[0-9][0-9]?.kdc' file ← 0回あるいは1回 $ grep -E 'user[0-9][0-9]+.kdc' file ← 1回以上