locale(1)
locale - get locale-specific information
As shipped in IRIX 6.5. First release of IRIX 6.5.
NAME locale - get locale-specific information SYNOPSIS locale [ -a| -m] locale [-ck] name... DESCRIPTION The locale utility writes information about the current locale environment to the standard output. When locale is invoked without any arguments, it summarises the current locale environment for each locale category as determined by the settings of the environment variables defined LANG, LC_ALL, LC_CTYPE, LC_COLLATE, LC_MONETARY, LC_NUMERIC, LC_TIME, and LC_MESSAGES. When invoked with operands, it writes values that have been assigned to the keywords in the locale categories, as follows: -Specifying a keyword name selects the named keyword and the category containing that keyword. -Specifying a category name selects the named category and all keywords in that category. The following options are supported: -a Write information about all available locales. -c Write the names of selected locale categories; see STDOUT. The -c option increases readability when more than one category is selected (for example, via more than one keyword name or via a category name). It is valid both with and without the -k option. -k Write the names and values of selected keywords. name The name of a locale category as defined in the X/OPEN System Interface Definition , Chapter 5, Locale, the name of a keyword in a locale category. EXAMPLES In the following examples, the assumption is that locale environment variables are set as follows: > LANG =en_US LC_COLLATE =fr > locale would result in the following output: LANG=en_US LC_COLLATE="fr" LC_CTYPE="en_US" LC_TIME="en_US" LC_NUMERIC="en_US" LC_MONETARY="en_US" LC_MESSAGES="en_US" LC_ALL= > LC_ALL =en_US locale -ck decimal_point would produce: LC_NUMERIC decimal_point="." The following command shows an application of locale to determine whether a user-supplied response is affirmative: if printf "%s0 "$response" | grep -Eq "$( local yesstr )" then affirmative processing goes here else non-affirmative processing goes here fi FILES /usr/lib/locale/ system supported locales