Re: sed - output lines with one word

Paolo Bonzini <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <[email protected]>
Il 13/06/2012 08:52, Andreas Schwab ha scritto:
>> > Using the following command:
>> > $sed -n -r '/^\s*[^\s]+\s*$/p' test.txt
> [^\s] matches any character except \ and s.

Exactly, what you want is \S.

Paolo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.