So, basically
THIS LINE WOULD BE DELETED
and
(THIS LINE WOULD ALSO BE DELETED)
but
Indeed, THIS LINE WOULD NOT
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityQuite a few ways. Think negatively:
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