/usr/bin/capitalize is in xviewg 3.2p1.4-28.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 | #!/usr/bin/perl --
# Free replacement for Sun's capitalize as required by Openwin's
# text_extras_menu.
#
# Copyright (C) 1998 by Martin Buck <mbuck@debian.org>
# Licensed under the GNU General Public License
sub usage {
die "Usage: $0 -u|-l|-c\n";
}
usage if ($#ARGV != 0);
if ($ARGV[0] eq "-u") {
$capitalize = sub { s/(.)/\u$1/g };
} elsif ($ARGV[0] eq "-l") {
$capitalize = sub { s/(.)/\l$1/g };
} elsif ($ARGV[0] eq "-c") {
$capitalize = sub { s/(^| |\t)(.)/$1\u$2/g };
} else {
usage;
}
while (<STDIN>) {
&$capitalize;
print $_;
}
|