MSGATTRIB(1) User Commands MSGATTRIB(1)

# [NAME](#NAME)

msgattrib - attribute matching and manipulation on message catalog

# [SYNOPSIS](#SYNOPSIS)

**msgattrib** \[*OPTION*] \[*INPUTFILE*]

# [DESCRIPTION](#DESCRIPTION)

Filters the messages of a translation catalog according to their attributes, and manipulates the attributes.

Mandatory arguments to long options are mandatory for short options too.

## [Input file location:](#Input_file_location:)

[INPUTFILE](#INPUTFILE)

input PO file

[**-D**, **--directory**=*DIRECTORY*](#D)

add DIRECTORY to list for input files search

If no input file is given or if it is -, standard input is read.

## [Output file location:](#Output_file_location:)

[**-o**, **--output-file**=*FILE*](#o)

write output to specified file

The results are written to standard output if no output file is specified or if it is -.

## [Message selection:](#Message_selection:)

[**--translated**](#translated)

keep translated, remove untranslated messages

[**--untranslated**](#untranslated)

keep untranslated, remove translated messages

[**--no-fuzzy**](#no)

remove 'fuzzy' marked messages

[**--only-fuzzy**](#only)

keep 'fuzzy' marked messages

[**--no-obsolete**](#no~2)

remove obsolete #~ messages

[**--only-obsolete**](#only~2)

keep obsolete #~ messages

## [Attribute manipulation:](#Attribute_manipulation:)

[**--set-fuzzy**](#set)

set all messages 'fuzzy'

[**--clear-fuzzy**](#clear)

set all messages non-'fuzzy'

[**--set-obsolete**](#set~2)

set all messages obsolete

[**--clear-obsolete**](#clear~2)

set all messages non-obsolete

[**--previous**](#previous)

when setting 'fuzzy', keep previous msgids of translated messages.

[**--clear-previous**](#clear~3)

remove the "previous msgid" from all messages

[**--empty**](#empty)

when removing 'fuzzy', also set msgstr empty

[**--only-file**=*FILE*.po](#only~3)

manipulate only entries listed in FILE.po

[**--ignore-file**=*FILE*.po](#ignore)

manipulate only entries not listed in FILE.po

[**--fuzzy**](#fuzzy)

synonym for **--only-fuzzy** **--clear-fuzzy**

[**--obsolete**](#obsolete)

synonym for **--only-obsolete** **--clear-obsolete**

## [Input file syntax:](#Input_file_syntax:)

[**-P**, **--properties-input**](#P)

input file is in Java .properties syntax

[**--stringtable-input**](#stringtable)

input file is in NeXTstep/GNUstep .strings syntax

## [Output details:](#Output_details:)

[**--color**](#color)

use colors and other text attributes always

[**--color**=*WHEN*](#color~2)

use colors and other text attributes if WHEN. WHEN may be 'always', 'never', 'auto', or 'html'.

[**--style**=*STYLEFILE*](#style)

specify CSS style rule file for **--color**

[**-e**, **--no-escape**](#e)

do not use C escapes in output (default)

[**-E**, **--escape**](#E)

use C escapes in output, no extended chars

[**--force-po**](#force)

write PO file even if empty

[**-i**, **--indent**](#i)

write the .po file using indented style

[**--no-location**](#no~3)

do not write '#: filename:line' lines

[**-n**, **--add-location**](#n)

generate '#: filename:line' lines (default)

[**--strict**](#strict)

write out strict Uniforum conforming .po file

[**-p**, **--properties-output**](#p)

write out a Java .properties file

[**--stringtable-output**](#stringtable~2)

write out a NeXTstep/GNUstep .strings file

[**-w**, **--width**=*NUMBER*](#w)

set output page width

[**--no-wrap**](#no~4)

do not break long message lines, longer than the output page width, into several lines

[**-s**, **--sort-output**](#s)

generate sorted output

[**-F**, **--sort-by-file**](#F)

sort output by file location

## [Informative output:](#Informative_output:)

[**-h**, **--help**](#h)

display this help and exit

[**-V**, **--version**](#V)

output version information and exit

# [AUTHOR](#AUTHOR)

Written by Bruno Haible.

# [REPORTING BUGS](#REPORTING_BUGS)

Report bugs in the bug tracker at &lt;https://savannah.gnu.org/projects/gettext&gt; or by email to &lt;bug-gettext@gnu.org&gt;.

# [COPYRIGHT](#COPYRIGHT)

Copyright © 2001-2026 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later &lt;https://gnu.org/licenses/gpl.html&gt;  
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

# [SEE ALSO](#SEE_ALSO)

The full documentation for **msgattrib** is maintained as a Texinfo manual. If the **info** and **msgattrib** programs are properly installed at your site, the command

**info msgattrib**

should give you access to the complete manual.

August 2026 GNU gettext-tools 1.0

---

Document: msgattrib(1) from gettext 1.0-r7 (Chainguard OS)
Source: https://git.savannah.gnu.org/git/gettext.git
