|
Last change
on this file since 3642 was 3529, checked in by bird, 4 years ago |
|
Imported grep 3.7 from grep-3.7.tar.gz (sha256: c22b0cf2d4f6bbe599c902387e8058990e1eee99aef333a203829e5fd3dbb342), applying minimal auto-props.
|
-
Property svn:executable
set to
*
|
|
File size:
441 bytes
|
| Line | |
|---|
| 1 | #!/usr/bin/perl -nl
|
|---|
| 2 | # Use Perl's multi-byte alignment code, via sprintf, while
|
|---|
| 3 | # performing a rudimentary check for duplicate names and
|
|---|
| 4 | # removing duplicate name,email pairs.
|
|---|
| 5 | use Encode;
|
|---|
| 6 |
|
|---|
| 7 | BEGIN { my (%seen, %name) }
|
|---|
| 8 |
|
|---|
| 9 | chomp;
|
|---|
| 10 | my ($name, $email) = split '\0', decode ('UTF-8', $_);
|
|---|
| 11 |
|
|---|
| 12 | $seen{$name}++
|
|---|
| 13 | and warn "$0: THANKS.in: duplicate name: $name\n";
|
|---|
| 14 |
|
|---|
| 15 | print encode ('UTF-8', sprintf ('%-36s', $name)), $email
|
|---|
| 16 | unless $seen{"$name\0$email"}++;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.