[PATCH v2 2/3] Various pages: Use correct letter case in page titles (TH)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Semi-scripted change:

$ find man* -type f \
  | xargs grep -L '\.so' \
  | while read f; do
      P=$(basename $f);
      T=$(grep '\.TH ' $f | cut -f2,3 -d' ' | sed 's/ /./');
      p=$(echo $P | tr '[:upper:]' '[:lower:]');
      t=$(echo $T | tr '[:upper:]' '[:lower:]');
      Tn=$(echo $T | sed 's/\.[^.]\+$//')
      Pn=$(echo $P | sed 's/\.[^.]\+$//')

      N=$(man_section $f NAME \
      | sed -n '/NAME/,/ - /p' \
      | sed 's/ - .*//' \
      | grep -v '^NAME$' \
      | tr ', ' '\n' \
      | grep -i "^$Pn$" \
      | head -n1)

      test $P = $T \
      && test -n $N \
      && continue;

      if test "x$p" != "x$t"; then
          echo 1 $P $T $N;
      elif test -z "$N"; then
          sed -i "/\.TH /s/$Tn/$Pn/" $f;
      fi;
  done;

Most of the changes produced by this script needed to be reverted,
but the some of them were good.

Cc: Ingo Schwarze <schwarze@xxxxxxxxxxx>
Cc: "G. Branden Robinson" <g.branden.robinson@xxxxxxxxx>
Signed-off-by: Alejandro Colomar <alx@xxxxxxxxxx>
---
 man7/man-pages.7            | 2 +-
 man7/persistent-keyring.7   | 2 +-
 man7/process-keyring.7      | 2 +-
 man7/session-keyring.7      | 2 +-
 man7/signal-safety.7        | 2 +-
 man7/thread-keyring.7       | 2 +-
 man7/user-keyring.7         | 2 +-
 man7/user-session-keyring.7 | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/man7/man-pages.7 b/man7/man-pages.7
index 03b0e6c15..73c0522d1 100644
--- a/man7/man-pages.7
+++ b/man7/man-pages.7
@@ -7,7 +7,7 @@
 .\" 2007-05-30 created by mtk, using text from old man.7 plus
 .\" rewrites and additional text.
 .\"
-.TH MAN-PAGES 7 (date) "Linux man-pages (unreleased)"
+.TH man-pages 7 (date) "Linux man-pages (unreleased)"
 .SH NAME
 man-pages \- conventions for writing Linux man pages
 .SH SYNOPSIS
diff --git a/man7/persistent-keyring.7 b/man7/persistent-keyring.7
index a93c9d84f..2a7fe49c2 100644
--- a/man7/persistent-keyring.7
+++ b/man7/persistent-keyring.7
@@ -3,7 +3,7 @@
 .\"
 .\" SPDX-License-Identifier: GPL-2.0-or-later
 .\"
-.TH PERSISTENT-KEYRING 7 (date) "Linux man-pages (unreleased)"
+.TH persistent-keyring 7 (date) "Linux man-pages (unreleased)"
 .SH NAME
 persistent-keyring \- per-user persistent keyring
 .SH DESCRIPTION
diff --git a/man7/process-keyring.7 b/man7/process-keyring.7
index ec6fbc8f1..864b05bcd 100644
--- a/man7/process-keyring.7
+++ b/man7/process-keyring.7
@@ -3,7 +3,7 @@
 .\"
 .\" SPDX-License-Identifier: GPL-2.0-or-later
 .\"
-.TH PROCESS-KEYRING 7 (date) "Linux man-pages (unreleased)"
+.TH process-keyring 7 (date) "Linux man-pages (unreleased)"
 .SH NAME
 process-keyring \- per-process shared keyring
 .SH DESCRIPTION
diff --git a/man7/session-keyring.7 b/man7/session-keyring.7
index 1921ce8ab..cece09fa4 100644
--- a/man7/session-keyring.7
+++ b/man7/session-keyring.7
@@ -3,7 +3,7 @@
 .\"
 .\" SPDX-License-Identifier: GPL-2.0-or-later
 .\"
-.TH SESSION-KEYRING 7 (date) "Linux man-pages (unreleased)"
+.TH session-keyring 7 (date) "Linux man-pages (unreleased)"
 .SH NAME
 session-keyring \- session shared process keyring
 .SH DESCRIPTION
diff --git a/man7/signal-safety.7 b/man7/signal-safety.7
index b6a563b91..8833dbc3e 100644
--- a/man7/signal-safety.7
+++ b/man7/signal-safety.7
@@ -2,7 +2,7 @@
 .\"
 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
 .\"
-.TH SIGNAL-SAFETY 7 (date) "Linux man-pages (unreleased)"
+.TH signal-safety 7 (date) "Linux man-pages (unreleased)"
 .SH NAME
 signal-safety \- async-signal-safe functions
 .SH DESCRIPTION
diff --git a/man7/thread-keyring.7 b/man7/thread-keyring.7
index c093b8fed..b47f68243 100644
--- a/man7/thread-keyring.7
+++ b/man7/thread-keyring.7
@@ -3,7 +3,7 @@
 .\"
 .\" SPDX-License-Identifier: GPL-2.0-or-later
 .\"
-.TH THREAD-KEYRING 7 (date) "Linux man-pages (unreleased)"
+.TH thread-keyring 7 (date) "Linux man-pages (unreleased)"
 .SH NAME
 thread-keyring \- per-thread keyring
 .SH DESCRIPTION
diff --git a/man7/user-keyring.7 b/man7/user-keyring.7
index 4634f5570..a6e29c9db 100644
--- a/man7/user-keyring.7
+++ b/man7/user-keyring.7
@@ -3,7 +3,7 @@
 .\"
 .\" SPDX-License-Identifier: GPL-2.0-or-later
 .\"
-.TH USER-KEYRING 7 (date) "Linux man-pages (unreleased)"
+.TH user-keyring 7 (date) "Linux man-pages (unreleased)"
 .SH NAME
 user-keyring \- per-user keyring
 .SH DESCRIPTION
diff --git a/man7/user-session-keyring.7 b/man7/user-session-keyring.7
index 009c404aa..bd0ba3d23 100644
--- a/man7/user-session-keyring.7
+++ b/man7/user-session-keyring.7
@@ -3,7 +3,7 @@
 .\"
 .\" SPDX-License-Identifier: GPL-2.0-or-later
 .\"
-.TH USER-SESSION-KEYRING 7 (date) "Linux man-pages (unreleased)"
+.TH user-session-keyring 7 (date) "Linux man-pages (unreleased)"
 .SH NAME
 user-session-keyring \- per-user default session keyring
 .SH DESCRIPTION
-- 
2.37.2




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux