{
    "mode": "man",
    "parameter": "msgfilter",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/msgfilter/1/json",
    "generated": "2026-06-13T18:17:29Z",
    "synopsis": "msgfilter [OPTION] FILTER [FILTER-OPTION]",
    "sections": {
        "NAME": {
            "content": "msgfilter - edit translations of message catalog\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "msgfilter [OPTION] FILTER [FILTER-OPTION]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Applies a filter to all translations of a translation catalog.\n\nMandatory arguments to long options are mandatory for short options too.\n",
            "subsections": [
                {
                    "name": "Input file location:",
                    "content": ""
                },
                {
                    "name": "-i --input",
                    "content": "input PO file\n",
                    "flag": "-i",
                    "long": "--input"
                },
                {
                    "name": "-D --directory",
                    "content": "add DIRECTORY to list for input files search\n\nIf no input file is given or if it is -, standard input is read.\n",
                    "flag": "-D",
                    "long": "--directory"
                },
                {
                    "name": "Output file location:",
                    "content": ""
                },
                {
                    "name": "-o --output-file",
                    "content": "write output to specified file\n\nThe results are written to standard output if no output file is specified or if it is -.\n\nThe FILTER can be any program that reads a translation from standard input and writes a modi‐\nfied translation to standard output.\n",
                    "flag": "-o",
                    "long": "--output-file"
                },
                {
                    "name": "Filter input and output:",
                    "content": ""
                },
                {
                    "name": "--newline",
                    "content": "add a newline at the end of input and remove a newline from the end of output\n",
                    "long": "--newline"
                },
                {
                    "name": "Useful FILTER-OPTIONs when the FILTER is 'sed':",
                    "content": ""
                },
                {
                    "name": "-e --expression",
                    "content": "add SCRIPT to the commands to be executed\n",
                    "flag": "-e",
                    "long": "--expression"
                },
                {
                    "name": "-f --file",
                    "content": "add the contents of SCRIPTFILE to the commands to be executed\n",
                    "flag": "-f",
                    "long": "--file"
                },
                {
                    "name": "-n --quiet --silent",
                    "content": "suppress automatic printing of pattern space\n",
                    "flag": "-n",
                    "long": "--silent"
                },
                {
                    "name": "Input file syntax:",
                    "content": ""
                },
                {
                    "name": "-P --properties-input",
                    "content": "input file is in Java .properties syntax\n",
                    "flag": "-P",
                    "long": "--properties-input"
                },
                {
                    "name": "--stringtable-input",
                    "content": "input file is in NeXTstep/GNUstep .strings syntax\n",
                    "long": "--stringtable-input"
                },
                {
                    "name": "Output details:",
                    "content": ""
                },
                {
                    "name": "--color",
                    "content": "use colors and other text attributes always\n\n--color=WHEN\nuse colors and other text attributes if WHEN.  WHEN may be 'always', 'never',  'auto',\nor 'html'.\n\n--style=STYLEFILE\nspecify CSS style rule file for --color\n",
                    "long": "--color"
                },
                {
                    "name": "--no-escape",
                    "content": "do not use C escapes in output (default)\n",
                    "long": "--no-escape"
                },
                {
                    "name": "-E --escape",
                    "content": "use C escapes in output, no extended chars\n",
                    "flag": "-E",
                    "long": "--escape"
                },
                {
                    "name": "--force-po",
                    "content": "write PO file even if empty\n",
                    "long": "--force-po"
                },
                {
                    "name": "--indent",
                    "content": "indented output style\n",
                    "long": "--indent"
                },
                {
                    "name": "--keep-header",
                    "content": "keep header entry unmodified, don't filter it\n",
                    "long": "--keep-header"
                },
                {
                    "name": "--no-location",
                    "content": "suppress '#: filename:line' lines\n",
                    "long": "--no-location"
                },
                {
                    "name": "-n --add-location",
                    "content": "preserve '#: filename:line' lines (default)\n",
                    "flag": "-n",
                    "long": "--add-location"
                },
                {
                    "name": "--strict",
                    "content": "strict Uniforum output style\n",
                    "long": "--strict"
                },
                {
                    "name": "-p --properties-output",
                    "content": "write out a Java .properties file\n",
                    "flag": "-p",
                    "long": "--properties-output"
                },
                {
                    "name": "--stringtable-output",
                    "content": "write out a NeXTstep/GNUstep .strings file\n",
                    "long": "--stringtable-output"
                },
                {
                    "name": "-w --width",
                    "content": "set output page width\n",
                    "flag": "-w",
                    "long": "--width"
                },
                {
                    "name": "--no-wrap",
                    "content": "do not break long message lines, longer than the output page width, into several lines\n",
                    "long": "--no-wrap"
                },
                {
                    "name": "-s --sort-output",
                    "content": "generate sorted output\n",
                    "flag": "-s",
                    "long": "--sort-output"
                },
                {
                    "name": "-F --sort-by-file",
                    "content": "sort output by file location\n",
                    "flag": "-F",
                    "long": "--sort-by-file"
                },
                {
                    "name": "Informative output:",
                    "content": ""
                },
                {
                    "name": "-h --help",
                    "content": "display this help and exit\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-V --version",
                    "content": "output version information and exit\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "AUTHOR": {
            "content": "Written by Bruno Haible.\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "Report  bugs in the bug tracker at <https://savannah.gnu.org/projects/gettext> or by email to\n<bug-gettext@gnu.org>.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright © 2001-2020 Free Software Foundation, Inc.  License GPLv3+: GNU GPL  version  3  or\nlater <https://gnu.org/licenses/gpl.html>\nThis  is free software: you are free to change and redistribute it.  There is NO WARRANTY, to\nthe extent permitted by law.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "The full documentation for msgfilter is maintained as a Texinfo manual.  If the info and msg‐‐\nfilter programs are properly installed at your site, the command\n\ninfo msgfilter\n\nshould give you access to the complete manual.\n\n\n\nGNU gettext-tools 0.21                       March 2022                                 MSGFILTER(1)",
            "subsections": []
        }
    },
    "summary": "msgfilter - edit translations of message catalog",
    "flags": [
        {
            "flag": "-i",
            "long": "--input",
            "arg": null,
            "description": "input PO file"
        },
        {
            "flag": "-D",
            "long": "--directory",
            "arg": null,
            "description": "add DIRECTORY to list for input files search If no input file is given or if it is -, standard input is read."
        },
        {
            "flag": "-o",
            "long": "--output-file",
            "arg": null,
            "description": "write output to specified file The results are written to standard output if no output file is specified or if it is -. The FILTER can be any program that reads a translation from standard input and writes a modi‐ fied translation to standard output."
        },
        {
            "flag": "",
            "long": "--newline",
            "arg": null,
            "description": "add a newline at the end of input and remove a newline from the end of output"
        },
        {
            "flag": "-e",
            "long": "--expression",
            "arg": null,
            "description": "add SCRIPT to the commands to be executed"
        },
        {
            "flag": "-f",
            "long": "--file",
            "arg": null,
            "description": "add the contents of SCRIPTFILE to the commands to be executed"
        },
        {
            "flag": "-n",
            "long": "--silent",
            "arg": null,
            "description": "suppress automatic printing of pattern space"
        },
        {
            "flag": "-P",
            "long": "--properties-input",
            "arg": null,
            "description": "input file is in Java .properties syntax"
        },
        {
            "flag": "",
            "long": "--stringtable-input",
            "arg": null,
            "description": "input file is in NeXTstep/GNUstep .strings syntax"
        },
        {
            "flag": "",
            "long": "--color",
            "arg": null,
            "description": "use colors and other text attributes always --color=WHEN use colors and other text attributes if WHEN. WHEN may be 'always', 'never', 'auto', or 'html'. --style=STYLEFILE specify CSS style rule file for --color"
        },
        {
            "flag": "",
            "long": "--no-escape",
            "arg": null,
            "description": "do not use C escapes in output (default)"
        },
        {
            "flag": "-E",
            "long": "--escape",
            "arg": null,
            "description": "use C escapes in output, no extended chars"
        },
        {
            "flag": "",
            "long": "--force-po",
            "arg": null,
            "description": "write PO file even if empty"
        },
        {
            "flag": "",
            "long": "--indent",
            "arg": null,
            "description": "indented output style"
        },
        {
            "flag": "",
            "long": "--keep-header",
            "arg": null,
            "description": "keep header entry unmodified, don't filter it"
        },
        {
            "flag": "",
            "long": "--no-location",
            "arg": null,
            "description": "suppress '#: filename:line' lines"
        },
        {
            "flag": "-n",
            "long": "--add-location",
            "arg": null,
            "description": "preserve '#: filename:line' lines (default)"
        },
        {
            "flag": "",
            "long": "--strict",
            "arg": null,
            "description": "strict Uniforum output style"
        },
        {
            "flag": "-p",
            "long": "--properties-output",
            "arg": null,
            "description": "write out a Java .properties file"
        },
        {
            "flag": "",
            "long": "--stringtable-output",
            "arg": null,
            "description": "write out a NeXTstep/GNUstep .strings file"
        },
        {
            "flag": "-w",
            "long": "--width",
            "arg": null,
            "description": "set output page width"
        },
        {
            "flag": "",
            "long": "--no-wrap",
            "arg": null,
            "description": "do not break long message lines, longer than the output page width, into several lines"
        },
        {
            "flag": "-s",
            "long": "--sort-output",
            "arg": null,
            "description": "generate sorted output"
        },
        {
            "flag": "-F",
            "long": "--sort-by-file",
            "arg": null,
            "description": "sort output by file location"
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "display this help and exit"
        },
        {
            "flag": "-V",
            "long": "--version",
            "arg": null,
            "description": "output version information and exit"
        }
    ],
    "examples": [],
    "see_also": []
}