diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-08-24 20:32:18 +0200 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-08-24 20:33:40 +0200 |
commit | e3ad11c9a4542c83324edf549e548767535cae63 (patch) | |
tree | 622243ee89814525863b7dd7fe73088cbe64338e /scripts | |
parent | fa26dee47f834b1e07f75897245455ccde5a0448 (diff) |
print_encoding.sh: Remove unused script
It considers every page as utf-8, so it doesn't provide any useful
information.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/print_encoding.sh | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/scripts/print_encoding.sh b/scripts/print_encoding.sh deleted file mode 100755 index d6afc3e91..000000000 --- a/scripts/print_encoding.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# -# print_encoding.sh -# -# Print man pages with encoding other than us-ascii, together with -# their encoding by file utility and by the first line in the man page. -# -# Example usage: -# -# cd man-pages-x.yy -# sh print_encoding.sh man?/* -# -###################################################################### -# -# (C) Copyright 2013, Peter Schiffer <pschiffe@redhat.com> -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details -# (http://www.gnu.org/licenses/gpl-2.0.html). -# - -if [[ $# -lt 1 ]]; then - echo "Usage: ${0} man?/*" 1>&2 - exit 1 -fi - -printf "\n %-23s%-19s%s\n\n" "Man Page" "Encoding by file" "Encoding by first line" - -for f in "$@"; do - if [[ ! -f "$f" ]]; then - continue - fi - - enc=$(file -bi "$f" | cut -d = -f 2) - if [[ $enc != "us-ascii" ]]; then - lenc=$(head -n 1 "$f" | sed -n "s/.*coding: \([^ ]*\).*/\1/p") - printf " * %-23s%-19s%s\n" "$f" "$enc" "$lenc" - fi -done - -exit 0 |