2012-12-25 19:45:05 |
Sergey Romanov |
description |
dpkg-awk has a two-letter short option -rs to set record separator, but /usr/share/awk/getlong.awk only allows one-letter short options as arguments to dpkg-awk. The equivalent long option --rec_sep works as advertised.
Attached diff enables two-letter short options for dpkg-awk.
Besides -rs/--rec_sep, there is an undocumented option -of/--outform that also benefits from the patch. However, this option is of little use as all it does is suppress the output of fields not specified explicitly on command line (usually when negating the output fields). I.e. if
dpkg-awk -- ^description
will show all the records from /var/lib/dpkg/status omitting package descriptions then
dpkg-awk -of=x --^description
will show only empty lines, one for each record from /var/lib/dpkg/status |
dpkg-awk has a two-letter short option -rs to set record separator, but /usr/share/awk/getlong.awk only allows one-letter short options as arguments to dpkg-awk. The equivalent long option --rec_sep works as advertised.
Attached diff enables two-letter short options for dpkg-awk.
Besides -rs/--rec_sep, there is an undocumented option -of/--outform that also benefits from the patch. However, this option is of little use as all it does is suppress the output of fields not specified explicitly on command line (usually when negating the output fields). I.e. if
dpkg-awk -- ^description
will show all the records from /var/lib/dpkg/status omitting package descriptions then
dpkg-awk -of=x -- ^description
will show only empty lines, one for each record from /var/lib/dpkg/status |
|