Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
sed '/[a-z]/!d' # !x runs x if the pattern doesn't match
grep -v '[a-z]' # -v means print if the regexp doesn't match
awk '!/[a-z]/' # !expr negates expr