/usr/bin/debconf-escape is in debconf 1.5.61.
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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | #!/usr/bin/perl -w
# This file was preprocessed, do not edit!
use strict;
use Getopt::Long;
use vars qw($escape $unescape);
sub usage {
print STDERR <<EOF;
Usage: debconf-unescape -e|-u < input-text
-e, --escape escape text
-u, --unescape unescape text
Exactly one of -e or -u must be used.
EOF
exit(1);
}
$escape=0;
$unescape=0;
GetOptions(
"escape|e" => \$escape,
"unescape|u" => \$unescape,
) || usage();
if ($escape == $unescape) {
usage();
}
if ($escape) {
while (<>) {
s/\\/\\\\/g;
s/\n/\\n/g;
print;
}
} else {
while (<>) {
for (split /(\\.)/) {
s/\\(.)/$1 eq "n" ? "\n" : $1/eg;
print;
}
}
}
|