DBE

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
EXIT CODES
AUTHOR
LICENSE

NAME

dbe - expand double-braced references with the values from environment

SYNOPSIS

dbe [-kn] [-i SUFFIX] FILE [FILE...]
dbe -h

DESCRIPTION

For each FILE from the command line, expands each occurrence of {{X}} in the file with the value of the environment variable X. By default, expansion goes to the standard error. The -i option requests expansion in place. In this case a backup copy of each FILE is created with the name constructed by concatenating the file name and SUFFIX. If SUFFIX is empty string, no backups are created.

It is an error if the variable X is not defined. In this case, the program prints a diagnostic message on the standard error with the exact location (file name and line) of the error and name of the variable in question. The default behavior is to exit immediately at the first such error. It is changed by the -k ("keep going") option, which instructs the program to continue, leaving the reference to the undefined variable untouched. The program exits with the status code 65 if undefined variables have been encountered.

OPTIONS

-i SUFFIX

Edit files in place, saving backups with the specified SUFFIX, unless it is an empty string, in which case no backups are created.

-k

Keep going after encountering undefined variables. Leave undefined references untouched.

-n

Dry-run mode. Process all files reporting each occurrence of undefined variable, but producing no output. Implies -k.

-h

Print a short usage summary.

EXIT CODES

0

Success.

64

Command line usage error.

65

One or more variables referred to in the files are not defined.

66

Input file cannot be opened.

71

Operating system error (access to the file denied, etc.)

73

Unable to create output file.

AUTHOR

Sergey Poznyakoff

LICENSE

"THE BEER-WARE LICENSE" (Revision 42):

<gray@gnu.org> wrote this file. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.


Manpage server at man.gnu.org.ua.

Powered by mansrv 1.1