[prev in list] [next in list] [prev in thread] [next in thread]
List: redhat-list
Subject: Re: need a sed guru to help me strip out words
From: Rob <rob () OhReally ! com>
Date: 2004-04-22 16:24:07
Message-ID: 200404221824.10660.rob () OhReally ! com
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
donderdag 22 april 2004 17:41, Eric Wood:
> # fuser -u SO* | sed 'something' | uniq
Something like this?
# fuser -u SO* | sed -e 's/.*:[[:blank:]]*//g; s/ \+/\n/g' | sed -e
's/.*(\(.*\))/\1/' | uniq
(Put it all on 1 line.)
s/.*:[[:blank:]]//g
strips leading filename, colon and whitespace (leaving just the pids
and usernames)
s/ \+/\n/g
turns all whitespace into newlines
s/.*(\(.*\))/\1/
extracts the usernames
cheers,
Rob
- --
PGP public key:
http://www.OhReally.com/pubkey.asc
Key fingerprint:
9EEB 484F 6C91 3DD2 4C8D 3F1C 1D7D 189B 4BF0 E1DC
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQFAh/GoHX0Ym0vw4dwRAkvdAKCJuO4pAsokIeI3/Q9FUE9qW+boRgCgnnUk
RpEVpKBzkeJZAQOLtinoEHY=
=fEQp
-----END PGP SIGNATURE-----
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic