1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-23 15:02:07 +02:00
tldr/scripts/wrong-filename.sh
Juri Dispan 9d383ade68
*: fix typos in command names (#11730)
* *: fix typos in command names

* command name fixes in other languages

* fix incorrectly translated commands

* change incorrect file name

* qm move disk alias pages

---------

Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-12-14 17:41:19 +05:30

15 lines
448 B
Bash
Executable file

#!/bin/sh
# SPDX-License-Identifier: MIT
set -e
for path in $(find . -name '*.md' -type f); do
COMMAND_NAME_FILE=$(basename "$path" | head -c-4 | tr '-' ' ' | tr '[:upper:]' '[:lower:]')
COMMAND_NAME_PAGE=$(head -n1 "$path" | tail -c+3 | tr '-' ' ' | tr '[:upper:]' '[:lower:]')
if [ "$COMMAND_NAME_FILE" != "$COMMAND_NAME_PAGE" ]; then
echo "$path"
echo "$COMMAND_NAME_FILE"
echo "$COMMAND_NAME_PAGE"
echo "\n\n"
fi
done