need a sed guru to help me strip out words

Michael Schwendt ms-nospam-0306 at arcor.de
Thu Apr 22 16:28:59 UTC 2004


On Thu, 22 Apr 2004 11:41:04 -0400
"Eric Wood" <eric at interplas.com> wrote:

> # fuser -u SO*
> SODEI:  8952(whse) 23496(lhoover) 28450(recept) 28845(dschuetterle)
> 30835(awalter)
> SOLSI:  8952(whse) 23496(lhoover) 28450(recept) 28845(dschuetterle)
> 30835(awalter) 20242(ewood)
> 
> I need a sed formula to just list out the user names
> 
> # fuser -u SO* | sed 'something' | uniq
> whse
> lhoover
> recept
> dschuetterle
> awalter
> ewood
> 
> Any help is appreciated!

There are many ways to do it, e.g.

sed 's,^\w\+:,,;s,\ \+[0-9]\+(\(\w\+\)),\1\n,g'



-- 
Fedora Core release 1.91 (FC2) - Linux 2.6.5-1.327





More information about the redhat-list mailing list