выполнять расширения слов (perform word expansions)
Использование в приложениях (Application usage)
The wordexp() function is intended to be used by an application
that wants to do all of the shell's expansions on a word or words
obtained from a user. For example, if the application prompts for
a pathname (or list of pathnames) and then uses wordexp() to
process the input, the user could respond with anything that
would be valid as input to the shell.
The WRDE_NOCMD flag is provided for applications that, for
security or other reasons, want to prevent a user from executing
shell commands. Disallowing unquoted shell special characters
also prevents unwanted side-effects, such as executing a command
or writing a file.
POSIX.1‐2008 does not require the wordexp() function to be
thread-safe if passed an expression referencing an environment
variable while any other thread is concurrently modifying any
environment variable; see exec(1p).
Even though the WRDE_SHOWERR flag allows the implementation to
write messages to stderr during command substitution or syntax
errors, this standard does not provide any way to detect write
failures during the output of such messages.
Applications which use wide-character output functions with
stderr should ensure that any calls to wordexp() do not write to
stderr, by avoiding use of the WRDE_SHOWERR flag.