Gentoo Archives: gentoo-admin

From: "J.A." <HEBLACK@×××××××××××.COM>
To: gentoo-admin@l.g.o
Subject: Re: [gentoo-admin] system audit
Date: Sat, 24 Dec 2005 19:02:42
Message-Id: 43ADA86B.3040301@ISPMONSTERS.COM
In Reply to: Re: [gentoo-admin] system audit by Alex
1 Re: [gentoo-admin] system audit
2
3 Thanks for the leads.
4
5 I found a couple scripts at
6 http://gentooexperimental.org script repository
7 which show a lot of dependency and reverse dependency
8 information.
9
10 pkdep --- Removes unused dependencies for packages.
11 unclepine --- Reverse dependencies tool.
12
13 Now the small problem I have here is not being able
14 to enter some regular expressions into the command
15 line under bash.
16
17 Any regex containing ! or | operators seem to get
18 interpreted by bash as a bash operator. This could
19 be avoided by putting the regex into a (perl?) file
20 but then I would have to memorize a bunch of stupid
21 little file scripts or create a stupid little file
22 containing the script every time.
23
24 Here is one little example that doesn't work:
25
26 # Filter everything except lines containing
27 # token1 or token2
28 locate something | grep token1|token2
29
30 # Do not display lines with token3:
31 locate something | grep !token3
32
33 grep has a -v option which is the same as a regex
34 !token3 but I can't figure out how to then get grep
35 to recognize inverting more than one token such as
36 !(token3|token4).
37
38 The examples above are trying to filter
39 administrative commands so that the output is easier
40 to scroll through.
41
42 For instance locate is an administrative command
43 since it can only be run from root. That is why I am
44 posing this here to this mail list. The gentoo-users
45 list is flooded with too many emails. If the
46 question involves root then should it not be sent
47 here instead of to gentoo-users?
48
49 Thanks. Can anybody help filter output on the
50 command line? I did a lot of searching already.
51
52 --
53 HTTP://HEBLACK.BIZ
54
55
56 --
57 gentoo-admin@g.o mailing list

Replies

Subject Author
Re: [gentoo-admin] system audit Radoslaw Dlugosz <rdlugosz@×××××××××××××××.pl>
Re: [gentoo-admin] system audit Lares Moreau <lares.moreau@×××××.com>