> Would a regex pattern in grep work as well ? Of course. For example, on a Mac (my most convenient "grep" at the moment): pro3$ grep '[^ ]' bls.txt a b c d pro3$ But, as I always say, if you can't do it with "sed", then it doesn't really need doing.