Bug#387413: uniq-dctrl wanted

2007-01-17 Thread Guillem Jover
Hi,

At work I wrote some scripts to generate the delta status between two
distros in patch and version comparison forms. And I needed a
uniq-dctrl, which I implemented really cheaply with gawk. This of
course cannot be used as a general purpose tool and should probably
not be included in the package, but anyway others may find it useful,
or something. ;)

Attached the tiny script.

regards,
guillem
#!/usr/bin/gawk -f

BEGIN {
  RS=
  FS=\n
  old_pkg=
  pkg=
}

{
  # FIXME: We assume the Packages field is always the first one.
  pkg=$1
  if (old_pkg != pkg) {
print $0
print 
old_pkg=$1
  }
}



Bug#387413: uniq-dctrl wanted

2006-09-14 Thread Goswin von Brederlow
Package: dctrl-tools
Version: 2.9.0
Severity: wishlist
File: /usr/bin/sort-dctrl

Hi,

it would be nice to have an uniq-dctrl tool that would eliminate all
but the first entry in a series of entries with identical specific
fields. Just like uniq does for lines. The fields uniq-dctrl acts on
should be specifiable.

For performance reasons uniq should also be added to sort-dctrl as '-u
FIELDSPEC' option.

MfG
Goswin

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.8-frosties-2
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages dctrl-tools depends on:
ii  libc6 2.3.6-18   GNU C Library: Shared libraries

dctrl-tools recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]