/usr/bin/dpkg-awk is in dpkg-awk 1.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 | #!/bin/sh
# be sure to chmod +x this!
# ./script "fieldname: regex" "fieldname: regex" ... --
# "fieldname" "fieldname" ...
# Find all records matching the regex expressions, and output the
# requested fieldnames.
# The fieldnames can be upper or lowercase. When outputing the
# fieldnames, the case used is the same as specified on the
# cmd line.
# sample cmdline:
#
# dpkg-awk --sort "Package" "Status: .* installed$" -- ^Description ^Conffiles
# --sort(-s) "<space separated list of fields to sort on>"
# --filename(-f) <filename to parse, default = /var/lib/dpkg/status>
# dpkg-awk [options] <regex expresion list> -- <output field list>
# <output field list>
# If the first char is "^", then it is a list of fields *NOT* to output,
# otherwise, it will output the listed fields.
inc_files="/usr/lib/awk/getlong.awk"
incf=''
for a in $inc_files;do
incf="$incf -f $a"
done
noposix="env -u POSIXLY_CORRECT"
#echo mawk $incf -f /usr/lib/awk/dpkg-awk -- "$@"
$noposix gawk $incf -f /usr/lib/awk/dpkg-awk.lib -- "--exebase=`basename $0`" "--exedir=`dirname $0`" "$@"
|