File: dpkg-awk.1

package info (click to toggle)
dpkg-awk 1.2+nmu2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 56 kB
  • sloc: awk: 364; sh: 3; makefile: 2
file content (86 lines) | stat: -rw-r--r-- 1,966 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
.TH DPKG-AWK 1 "Debian Utilities" "DEBIAN" \" -*- nroff -*-
.SH NAME
dpkg-awk \- Utility to read a dpkg style db file
.SH SYNOPSIS
\fBdpkg-awk\fP [\fB(\-f|--file) filename\fP] [\fB(\-d|--debug) ##\fP]
[\fB(\-s|--sort) list\fP] [\fB(\-rs|--rec_sep) ??\fP] '<fieldname>:<regex>' ... -- <out_fieldname> ..
.br
.SH DESCRIPTION
.I dpkg-awk
Parses a dpkg status file (or other similarly formatted file) and
outputs the resulting records.  It can use regex on the field
values to limit the returned records, it can also be told
which fields to output, and it can sort the
matched fields.
.SH OPTIONS

.TP
.PD 0
.I -f filename
.TP
.I --file filename
.PD
The file to parse.  The default is /var/lib/dpkg/status.
.TP
.PD 0
.I -d [#]
.TP
.I --debug [#]
.PD
Each time this is specified, it increased the debug level.
.TP
.PD 0
.I -s field(s)
.TP
.I --sort field(s)
.PD
A space or comma separated list of fields to sort on.
.TP
.PD 0
.I -n field(s)
.TP
.I --numeric field(s)
.PD
A space or comma separated list of fields that should be
interpreted as numeric in value.
.TP
.PD 0
.I -rs ??
.TP
.I --rec_sep ??
.PD
Output this string at the end of each output paragraph.
.TP
.PD 0
.I -h
.TP
.I --help
.PD
Display some help.
.TP
.I fieldname
The fields from the file, that are matched with the regex given.
The fieldnames are case insensitive.
.TP
.I out_fieldname
The fields from the file, that are output for each record.
If the first field listed begins with
.IR ^ ,
then the list of fields that follows will
.I NOT
be output.
.SH BUGS

Be warned that the author has only a shallow understanding of the 
dpkg packaging system, so there are probably tons of bugs in this
program.

This program comes with no warranties.  If running this program
causes fire and brimstone to rain down upon the earth, you will be
on your own.

This program accesses the dpkg database directly in places, querying 
for data that cannot be gotten via dpkg.

.SH AUTHOR
Adam Heath <doogie@debian.org>